bgillet/slim-utils

This package is abandoned and no longer maintained. No replacement package was suggested.

Utility classes for Slim based applications

1.4.0 2014-12-18 23:05 UTC

This package is not auto-updated.

Last update: 2019-01-08 20:57:16 UTC


README

Utility classes for Slim based applications.

Current utility classes are :

  • StringUtils

Class : StringUtils

This class offers static utility methods related to string manipulation :

  • emptyOrSpaces($value)
    • Test if given value is null, false (equivalent to a call to PHP empty() method) or composed with spaces only.
  • camelize($value, $ucFirst = false)
    • Camelize the given string value
    • If $ucFirst is true then first letter of returned string is upper.
  • replaceAccents($value)
    • Replace all accents in given string value with their no accent equivalent.
  • startsWith($haystack, $needle)
    • Check if $haystack starts with $needle.
  • endsWith($haystack, $needle)
    • Check if $haystack ends with $needle.