Core Function EndsWith

From Sputnik Wiki
Jump to: navigation, search
EndsWith( <expression>, <expression2>, <flag> )

Contents

Description

Check if a string ends with a substring.

Parameters

expression

The string to evaluate.

expression2

The substring to use.

flag

Optional; If flag is higher than 0 then it will be case insensitive.

Default is case sensitive.

Return Value

Success: Returns 1.

Failure: Returns 0.

Remarks

None.

Example

$str = "I'm a string";
println(      EndsWith($str, "ing")      ); // True
println(      EndsWith($str, "ING")      ); // False
println(      EndsWith($str, "ING", 1)      ); // True
Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox