Core Function Contains

From Sputnik Wiki
Jump to: navigation, search
Contains( <string>, <substring>, <casesense>)

Contents

Description

Check if string contains a sub string.

Parameters

string

The string to search.

substring

The substring to search for

casesense

Optional; If this is above 0 the function will use case insensitive search

Return Value

Success: Returns 1.

Failure: Returns 0.

Remarks

None.

Example

$val = "The fox";
 
// Regular and case sensitive
If( Contains($val, "fox") )
{
	println("It contains fox");
}
Else
{
	println("It does not fox");
}
 
// Case insensitive
If( Contains($val, "FOX", 1) )
{
	println("It contains fox");
}
Else
{
	println("It does not fox");
}
Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox