UGsNX6.0 发表于 2015-8-27 21:33
/ d3 E2 t: f3 n- v9 g Y, z谢谢了 ,能讲讲这个替换字符0 a8 f5 |( ]' Q2 o7 E$ h( a
PH=REPSTR(PS,PA,'',1) 的含义么
4 A7 i& N; p) n1 @! N: A其中的1又是什么意思 再次感谢了 * J/ p3 m* a( {2 v2 w
Synopsis% {4 u( z2 u1 f/ {. n
REPSTR('target string','search string','replacement string',pos)
$ r7 ?0 q1 M! s! ^* pDescription7 d8 X r) B5 z2 I
Replaces a specific character string with another. In this function the target string is the string to be altered, the search string is the string to be found and the replacement string the new string. The pos value specifies a position in the string where the search is to begin. The search continues to the last position in the string or until the first occurrence of the search string is found. If the search string is not found, the target string is returned unchanged. If pos is less than one or greater than the number of characters in the string, the error message INVALID CHAR POS displays.
4 y6 h/ }, f0 T- FParameters4 c- _! k9 S- f" ^
Parameter | Description | 'target string' | The literal string or string variable name of the string to be altered. | 'search string' | The set of character(s) which gets searched for in the specified target string. Only the first occurrence of the search string, past the starting position (pos), is replaced. | 'replacement string' | The set of character(s) which replaces the search string characters. The number of characters in the search and replacement strings do not have to be equal. | pos | Character position in the target string where the search begins. Pos must be an integer value greater than zero. Spaces (blank characters) are counted in determining a character's position in the target string. The positions are counted from left to right with the first character in the string being 1. |
/ _- P# V2 q/ I5 o2 x1 [
' a/ J5 V1 r9 n/ W6 X rfile:///D:/Program%20Files%20(x86)/UGS/NX%204.0/ugdoc/html_files/graphics/ch416.gif ; r/ M% t6 `$ t
Figure 1-3 Numeric Positions of Characters in a String |