xHarbour Reference Documentation > Function Reference xHarbour Developers Network  

AllTrim()

Removes leading and trailing blank spaces from a string.

Syntax

AllTrim( <cString> ) --> cTrimmed

Arguments

<cString>
<cString> is any character string.

Return

The function returns the passed string without leading and trailing blank spaces.

Description

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>.

Info

See also:LTrim(), PadC() | PadL() | PadR(), RTrim()
Category: Character functions
Source:rtl\trim.c
LIB:xhb.lib
DLL:xhbdll.dll

Example

// 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

Copyright © 2006-2007 xHarbour.com Inc. All rights reserved.
http://www.xHarbour.com
Created by docmaker.exe