xHarbour Reference Documentation > Function Reference xHarbour Developers Network  

PosLower()

Returns the position of the first lower case letter in a character string.

Syntax

PosLower( <cString>   , ;
         [<lNoLower>] , ;
         [<nSkipChars>] ) --> nPos

Arguments

<cString>
This is the character string to search for the first lower case charatcer.
<lNoLower>
This parameter defaults to .F. (false) so that the first lower case character is searched. Passing .T. (true) instructs the function to search for the first non-lower case character.
<nSkipChars>
This numeric parameter defaults to 0 so that the function begins searching with the first character of <cString>. Passing a value > 0 instructs the function to ignore the first <nSkipChars> characters in the search.

Return

Depending on <lNoLower>, the function returns the position of the first (non)lower case character in <cString> as a numeric value.

Info

See also:PosAlpha(), PosRange(), PosUpper()
Category: CT:String manipulation , Character functions
Source:ct\pos1.c
LIB:xhb.lib
DLL:xhbdll.dll

Example

// The example displays results of PosLower()

   PROCEDURE Main
      LOCAL cString := "xHarbour"
      LOCAL nPos, cChr

      ? nPos := PosLower( cString )            // result:   1
      ? cChr := cString[ nPos ], ;             // result:   x  120
        Asc( cChr )

      ? nPos := PosLower( cString, .T. )       // result:   2
      ? cChr := cString[ nPos ], ;             // result:   H   72
        Asc( cChr )

      ? nPos := PosLower( cString, .F., nPos ) // result:   3
      ? cChr := cString[ nPos ], ;             // result:   a   97
        Asc( cChr )
   RETURN

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