Harbour All Functions – R

RangeRem

RangeRepl

RAt

Rate

RD / RMDIR / DirRemove

ReadKey

ReadVar()

RecCount

RecNo
RecSize

RemAll

RemLeft
RemRight
ReplAll
Replicate

ReplLeft

ReplRight

RestToken
Right

RLock

Round

Row

RToD

RTrim

String Functions

AddASCII

AfterAtNum

AllTrim
Asc

ASCIISum

ASCPos
At

AtAdjust

AtNum
AtRepl
AtToken

BeforAtNum

Chr

CharAdd
CharAnd
CharEven
CharHist
CharList
CharMirr
CharMix
CharNoList
CharNot
CharOdd
CharOne
CharOnly
CharOr
CharPix
CharRela
CharRelRep
CharRem
CharRepl
CharRLL
CharRLR
CharSHL
CharSHR
CharSList
CharSort
CharSub
CharSwap
CharWin
CharXOR

CountLeft
CountRight
Descend
Empty
hb_At
hb_RAt
hb_ValToStr
IsAlpha
IsDigit
IsLower
IsUpper

JustLeft
JustRight

Left
Len
Lower
LTrim

NumAt
NumToken
PadLeft
PadRight

PadC
PadL
PadR

POSALPHA
POSCHAR
POSDEL
POSDIFF
POSEQUAL
POSINS
POSLOWER
POSRANGE
POSREPL
POSUPPER

RangeRem
RangeRepl

RAt

RemAll

RemLeft
RemRight
ReplAll

Replicate

ReplLeft

ReplRight

RestToken

Right
RTrim

SaveToken

SetAtLike
Space
Str

StrDiff

StrFormat

StrSwap

StrTran
StrZero
SubStr

TabExpand
TabPack

Token

TokenAt
TokenEnd
TokenExit
TokenInit
TokenLower
TokenNext
TokenNum
TokenSep
TokenUpper

Transform
Trim
Upper
Val

ValPos
WordOne
WordOnly
WordRem
WordRepl
WordSwap

WordToChar


Trim()

Trim()

Remove trailing spaces from a string.

Syntax

      Trim( <cExpression> )   --> cString

Arguments

<cExpression> Any character expression

Returns

<cString> A formatted string with out any blank spaced.

Description

This function returns the value of <cString> with any trailing blank removed.

This function is identical to RTrim() and the opposite of LTrim(). Together with LTrim(), this function equated to the AllTrim() function.

Note : Characters with ASCII code 9, 10 and 13 always treated as “white spaces”.

Examples

      ? Trim( "HELLO" )     //  "HELLO"
      ? Trim( "" )          //   ""
      ? Trim( "UA   " )     //   "UA"
      ? Trim( "   UA" )     //   "   UA"

Compliance

Clipper

Platforms

All

Files

Library is core

Seealso

RTrim(), LTrim(), AllTrim()

LTrim()

LTRIM()

Removes leading spaces from a string

Syntax

      LTRIM( <cString> ) --> cReturn

Arguments

<cString> Character expression with leading spaces

Returns

LTRIM() returns a copy of the original string with leading spaces removed.

Description

This function trims the leading space blank

Note : Characters with ASCII code 9, 10 and 13 always treated as “white spaces”.

Examples

      ? LTRIM( "HELLO     " )

Compliance

Clipper

Platforms

All

Files

Library is rtl

Seealso

TRIM(), RTRIM(), ALLTRIM()

Len()

LEN()

Returns size of a string or size of an array.

Syntax

      LEN( <cString> | <aArray> ) --> <nLength>

Arguments

<acString> is a character string or the array to check.

Returns

The length of the string or the number of elements that contains an array.

Description

This function returns the string length or the size of an array or the size of a hash table. If it is used with a multidimensional array it returns the size of the first dimension.

Examples

      ? LEN( "Harbour" )           // 7
      ? LEN( { "One", "Two" } )    // 2

Tests

      PROCEDURE Test()
         LOCAL cName := ""
         ACCEPT "Enter your name: " TO cName
         ? LEN( cName )
         RETURN

Compliance

Clipper

Files

Library is rtl

Seealso

EMPTY(), RTRIM(), LTRIM(), AADD(), ASIZE()

AllTrim()

ALLTRIM()

Removes leading and trailing blank spaces from a string

Syntax

      ALLTRIM( <cString> ) --> cExpression

Arguments

<cString> Any character string

Returns

<cExpression> An string will all blank spaces removed from <cString>

Description

This function returns the string <cExpression> will all leading and trailing blank spaces removed.

Note : Characters with ASCII code 9, 10 and 13 always treated as “white spaces”.

Examples

      ? ALLTRIM( "HELLO HARBOUR" )
      ? ALLTRIM( "     HELLO HARBOUR" )
      ? ALLTRIM( "HELLO HARBOUR     " )
      ? ALLTRIM( "     HELLO HARBOUR     " )

Compliance

Clipper

Platforms

All

Files

Library is rtl

Seealso

LTRIM(), RTRIM(), TRIM()

SP_RJUST

RJUST()

  Short:
  ------
  RJUST() Right justifies a string

  Returns:
  --------
  <cJustified> => string right justified

  Syntax:
  -------
  RJUST(cTarget)

  Description:
  ------------
  Right justifies <cTarget>

  Examples:
  ---------
   string        := "Superfunction      "

   string        := RJUST(string)

   // (returns       "      Superfunction"

  Source:
  -------
  S_RJUST.PRG

See also : LJUST(), RTRIM()