Difference between revisions of "INDEXOF()"

From Lianjapedia
Jump to: navigation, search
m (1 revision)
 
(4 intermediate revisions by 3 users not shown)
Line 1: Line 1:
 
==Purpose==
 
==Purpose==
 
Function to return the numeric position of the first occurrence of a specified character string in another character string
 
Function to return the numeric position of the first occurrence of a specified character string in another character string
 
  
 
==Syntax==
 
==Syntax==
 
INDEXOF(<expC1>,<expC2>)
 
INDEXOF(<expC1>,<expC2>)
 
  
 
==See Also==
 
==See Also==
[[BETWEEN()]], [[CHROVERLAP()]], [[CONTAINS()]], [[EMPTY()]], [[ENDSWITH()]], [[EVALUATE()]], [[EXPRCHECK()]], [[FOR()]], [[INDEX]], [[INLIST()]], [[INRANGE()]], [[ISALPHA()]], [[ISBLANK()]], [[ISDIGIT()]], [[LOWER()]], [[MAX()]], [[MAXVALUES()]], [[MIN()]], [[MINVALUES()]], [[MTOS()]], [[PROPER()]], [[Relational Operators]], [[SEEK]], [[SEEK()]], [[SET EXACT]], [[STARTSWITH()]], [[SUBSTRINGOF()]], [[TYPE()]], [[UPPER()]], [[VARTYPE()]]
+
[[BETWEEN()]], [[CHROVERLAP()]], [[CONTAINS()]], [[EMPTY()]], [[ENDSWITH()]], [[EVALUATE()]], [[EXPRCHECK()]], [[FOR()]], [[INDEX]], [[INLIST()]], [[INRANGE()]], [[ISALPHA()]], [[ISBLANK()]], [[ISDIGIT()]], [[LOWER()]], [[MAX()]], [[MAXVALUES()]], [[MIN()]], [[MINVALUES()]], [[MTOS()]], [[PROPER()]], [[SEEK]], [[SEEK()]], [[SET EXACT]], [[STARTSWITH()]], [[SUBSTRINGOF()]], [[TYPE()]], [[UPPER()]], [[VARTYPE()]]
 
+
  
 
==Description==
 
==Description==
Line 16: Line 13:
 
A case-sensitive search is performed.  Character positions start from 1, if the string <expC2> is not found, INDEXOF() returns 0.
 
A case-sensitive search is performed.  Character positions start from 1, if the string <expC2> is not found, INDEXOF() returns 0.
  
 
+
{| class="wikitable" width="100%"
{| class="wikitable"
+
 
!Parameters||Description
 
!Parameters||Description
 
|-
 
|-
Line 25: Line 21:
 
|-
 
|-
 
|}
 
|}
 
  
 
==Example==
 
==Example==
Line 31: Line 26:
 
open database southwind
 
open database southwind
 
use orders
 
use orders
browse for indexof(customerid,"AT") = 3
+
list for indexof(customerid,"AT") = 3
 
</code>
 
</code>
  
 
==Products==
 
Recital Server, Recital
 
 
[[Category:Documentation]]
 
[[Category:Documentation]]
 
[[Category:Functions]]
 
[[Category:Functions]]
[[Category:String Data]]
 
 
[[Category:String Data Functions]]
 
[[Category:String Data Functions]]
 +
[[Category:Lianja VFP Extensions]]
 +
[[Category:VFP Function Extensions]]

Latest revision as of 06:36, 4 February 2013

Purpose

Function to return the numeric position of the first occurrence of a specified character string in another character string

Syntax

INDEXOF(<expC1>,<expC2>)

See Also

BETWEEN(), CHROVERLAP(), CONTAINS(), EMPTY(), ENDSWITH(), EVALUATE(), EXPRCHECK(), FOR(), INDEX, INLIST(), INRANGE(), ISALPHA(), ISBLANK(), ISDIGIT(), LOWER(), MAX(), MAXVALUES(), MIN(), MINVALUES(), MTOS(), PROPER(), SEEK, SEEK(), SET EXACT, STARTSWITH(), SUBSTRINGOF(), TYPE(), UPPER(), VARTYPE()

Description

The INDEXOF() function returns the numeric position of the first occurrence of the specified character string, <expC2>, in another character string, <expC1>.

A case-sensitive search is performed. Character positions start from 1, if the string <expC2> is not found, INDEXOF() returns 0.

Parameters Description
<expC1> The character string to be searched.
<expC2> The character string to search for.

Example

open database southwind
use orders
list for indexof(customerid,"AT") = 3