Stud.IP  4.0
 All Data Structures Namespaces Files Functions Variables Groups
Studip\MarkupPrivate\Text Namespace Reference

Functions

 startsWith ($string, $prefix)
 
 endsWith ($string, $suffix)
 
 removePrefix ($string, $prefix)
 

Function Documentation

Studip\MarkupPrivate\Text\endsWith (   $string,
  $suffix 
)

Test if string ends with suffix.

Parameters
string$stringTested string.
string$suffixSuffix of tested string.
Returns
boolean TRUE if string ends with suffix.
Studip\MarkupPrivate\Text\removePrefix (   $string,
  $prefix 
)

Remove prefix from string.

Does not change the string if it has a different prefix.

Parameters
string$stringThe string that must start with the prefix.
string$prefixThe prefix of the string.
Returns
string String without prefix.
Studip\MarkupPrivate\Text\startsWith (   $string,
  $prefix 
)

Test if string starts with prefix.

Parameters
string$stringTested string.
string$prefixPrefix of tested string.
Returns
boolean TRUE if string starts with prefix.