
General utilities.
Parameters: string, regexp
Returns the number of times of regexp occurs in string.
Parameters: string, string
Returns the prefix common to both strings. An empty string
is returned if the strings have no common prefix.
Parameters: localpath, destpath
Returns a relative path to the destination from the local path,
after removal of any common prefix.
Parameter: delimiter, string
Returns: array, after splitting the string
Thanks to Ashley Winters