✨️ implement formatting of settings values on import and export
This commit is contained in:
parent
0d9b312a9b
commit
0b1128fce5
6 changed files with 436 additions and 59 deletions
|
@ -51,4 +51,24 @@ class CRM_TwingleCampaign_Utils_StringOperations {
|
|||
}
|
||||
return $string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if a string ands with another string.
|
||||
* @param $haystack
|
||||
* @param $needle
|
||||
* @return bool
|
||||
*/
|
||||
public static function endsWith($haystack, $needle): bool {
|
||||
return substr_compare($haystack, $needle, -strlen($needle)) === 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if a string starts with another string.
|
||||
* @param $haystack
|
||||
* @param $needle
|
||||
* @return bool
|
||||
*/
|
||||
public static function startsWith($haystack, $needle): bool {
|
||||
return substr_compare($haystack, $needle, 0, strlen($needle)) === 0;
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue