REPLLEFT() Exchanges particular characters at the beginning of a string ------------------------------------------------------------------------------ Syntax REPLLEFT(<cString>,<cReplacecharacter| nReplacecharacter>,[<cSearchCharacter| nSearchCharacter>]) --> cString Arguments <cString> [@] Designates the string that is processed. <cReplacecharacter|nReplacecharacter> Designates the character that replaces the character in <cSearchCharacter|nSearchCharacter> at the beginning of the <cString>. <cSearchCharacter|nSearchCharacter> Designates the character at the beginning of <cString> that is replaced by <cReplacecharacter| nReplacecharacter>. The default value is a space, CHR(32). Returns The processed <cString> is returned. Description REPLLEFT() can be used to exchange all leading characters in a string for any other selected character. Note . The return value of this function can be suppressed by implementing CSETREF() to save space in working memory. Examples . Replace the leading spaces with zeros: ? REPLLEFT(" 1234", "0") // "001234" . Replace the leading zeros with spaces: ? REPLLEFT("001234", " ", "0") // " 1234" . Replace only the leading spaces: ? REPLLEFT(" 1 ", "0") // "001 "
See Also: REPLALL() REPLRIGHT() CSETREF() Introduction