User Tools

Site Tools


clip_return_string_without_trailing_spaces_.htm
Navigation:  Language Reference > 13 - Built-in Functions >====== CLIP (return string without trailing spaces) ====== Previous pageReturn to chapter overviewNext page

CLIP(string)

blk2blue.jpg

CLIP Removes trailing spaces.
string A string expression.

The CLIP procedure removes trailing spaces from a string. The return string is a substring with no trailing spaces. CLIP is frequently used with the concatenation operator in string expressions using STRING data types.

CLIP is not needed with CSTRING data types, since these have a terminating character. CLIP is also not needed with PSTRING data types, since these have a length byte.

When used in conjunction with the LEFT procedure, you can remove both leading and trailing spaces (frequently called ALLTRIM in other languages).

Return Data Type: STRING

Example:

Name = CLIP(Last) & ', ' & CLIP(First) & Init & '.'  !Full name in military order

Name = CLIP(First) & CLIP(' ' & Middle) & ' ' & Last !Full name with or with middle

AllTrimVar = CLIP(LEFT(MyVar))                       !Trim leading and trailing spaces at once

See Also:

LEFT

clip_return_string_without_trailing_spaces_.htm.txt · Last modified: 2021/04/15 15:57 (external edit)