Core Function IndexNotOf

From Sputnik Wiki
(Difference between revisions)
Jump to: navigation, search
(Created page with "<pre> IndexNotOf( <expression>, <needle>, <pos>, <case>, <count> ) </pre> === Description === Reports the index of the first none occurrence of the specified character in the c...")
 
(pos)
Line 18: Line 18:
  
 
Optional; Position to start the search from within the expression.
 
Optional; Position to start the search from within the expression.
 +
 +
Default: 0
  
 
=== case ===
 
=== case ===

Revision as of 22:18, 20 August 2013

IndexNotOf( <expression>, <needle>, <pos>, <case>, <count> )

Contents

Description

Reports the index of the first none occurrence of the specified character in the current string. Parameters specify the starting search position in the current string and the type of search to use for the specified string. .

expression

The string to use.

needle

The character to not find (If you pass a string here the first character of it will be used as the needle).

pos

Optional; Position to start the search from within the expression.

Default: 0

case

Optional; Case sensitive option

0 = Case sensitive search

1 = Case insensitive search

Default: 0

count

Optional; The amount of characters to check before quitting the search

Return Value

Success: Returns position of the first found character in the string that does not match the needle.

Failure: Returns -1.

Remarks

None.

Example

Case sensitive

println(   IndexNotOf("The quick brown FoX", "T")   );

Case insensitive

println(   IndexNotOf("The quick brown FoX", "t", 0, true)   );
Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox