| xHarbour Reference Documentation > Function Reference |
![]() |
![]() |
![]() |
Removes leading and trailing blank spaces from a string.
AllTrim( <cString> ) --> cTrimmed
The function returns the passed string without leading and trailing blank spaces.
This function removes leading and trailing spaces from a string. Use function LTrim() or RTrim() to remove spaces on the left or right end of <cString>.
| See also: | LTrim(), PadC() | PadL() | PadR(), RTrim() |
| Category: | Character functions |
| Source: | rtl\trim.c |
| LIB: | xhb.lib |
| DLL: | xhbdll.dll |
// This example removes all leading and trailing spaces from strings.
PROCEDURE Main()
? "<" + AllTrim( " xHarbour " ) + ">" // result: <xHarbour>
? "<" + AllTrim( "xHarbour " ) + ">" // result: <xHarbour>
? "<" + AllTrim( " xHarbour" ) + ">" // result: <xHarbour>
RETURN NIL
http://www.xHarbour.com