xHarbour Reference Documentation > Function Reference xHarbour Developers Network  

BeforAtNum()

Extracts the remainder of a string before the last occurrance of a search string.

Syntax

BeforAtNum( <cSearch>   , ;
            <cString>   , ;
           [<nCount>]   , ;
           [<nSkipChars>] ) --> cResult

Arguments

<cSearch>
This is a character string to search for in <cString>.
<cString>
This is the character string to find <cSearch> in.
<nCount>
A numeric value indicating the number of occurrances of finding <cSearch> in <cString> before the function returns. It defaults to the last occurrance.
<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

The function returns the remainder of <cString> before the <nCount>th occurrance of <cSearch> in the string.

Description

BeforAtNum() begins searching <cSearch> in <cString> at the first plus <nSkipChars> characters. It terminates searching after <nCount> occurrances or after the last occurrance of <cSearch> and returns the remainder of <cString> to the left of the found string. The function recognizes the CSetAtMuPa() and SetAlike() settings.

Info

See also:AtNum(), AfterAtNum(), AtRepl(), NumAt(), CSetAtMuPa(), SetAtLike()
Category: CT:String manipulation , Character functions
Source:ct\atnum.c
LIB:xhb.lib
DLL:xhbdll.dll


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