| **Navigation:**  [[introduction.htm|Language Reference]] > 13 - Built-in Functions >====== CLIP (return string without trailing spaces) ====== | [[clear clear a variable .htm|{{btn_prev_n.gif|Previous page}}]][[introduction.htm|{{btn_home_n.gif|Return to chapter overview}}]][[clipboard return windows clipboard contents .htm|{{btn_next_n.gif|Next page}}]] | | || **CLIP(**//string//**)** {{blk2blue.jpg|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 return left justified string .htm|LEFT]]