Login +

Documentation

SLS_String::substrBeforeLastDelimiter

Since SillySmart 1.0

Description

Cut a string until the last delimiter
static string substrBeforeLastDelimiter ( string $element, string $delimiter);

Parameters

  • string $element
    the string to cut
  • string $delimiter
    the delimiter

Return

string $string
the string cut

Exemples

  •  var_dump(SLS_String::substrBeforeLastDelimiter("silly.smart","."));
     // will produce : "silly"
  •  var_dump(SLS_String::substrBeforeLastDelimiter("silly.smart.rules","."));
     // will produce : "silly.smart"

Comments

No comment on this function, be the first !

Add your comment

You must login/register to post a reply.