shiftc$(),shiftl$() and shiftr$()

Syntax
string shiftc$( string strg(.) )
string shiftl$( string strg(.) )
string shiftr$( string strg(.) )


Description
These return the specified string with certain adjustments. 
shiftc$() centers the string by equaling the number of leading and trailing spaces. If there is an odd number of spaces, the extra space becomes a trailing space. The returned string always has the same length as the input string. 
shiftl$() removes any leading spaces from the input string. 
shiftr$() moves the contents of the input string to the right, if there are trailing spaces. The length of the result is always the same as the length of the input string (this is not necessarily the declaration length). 


Note
These functions do not change the input string.


Example
shiftc$("  ABC      ")     | result  "    ABC    "
shiftl$("    ABC    ")     | result  "ABC    "
shiftr$("    ABC    ")     | result  "        ABC"


Related Post:

People who read this post also read :



0 comments:

Post a Comment

Share

Twitter Delicious Facebook Digg Stumbleupon Favorites More