2017 © Pedro Peláez
 

library php-library-stringutils

PHP Library String Utils

image

sinevia/php-library-stringutils

PHP Library String Utils

  • Sunday, July 1, 2018
  • by sinevia
  • Repository
  • 1 Watchers
  • 0 Stars
  • 145 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 4 Versions
  • 559 % Grown

The README.md

PHP Library String Utils

Utility functions for working with strings, (*1)

Installation

composer require sinevia/php-library-stringutils v1.1.0

Methods

  • camelize($string, $separator = " ", $remove_separator = false)
  • endsWith($string, $match) - Checks if a string ends with another string
  • fixNewLines($text) - Fixes all new lines \r\n to become \n
  • from_camel_case($input)
  • htmlEmailToText($html) - Simple function to convert HTML email to text
  • hasLowercase($string)
  • hasMinumumChars($string, $chars)
  • hasOnly($string, $gama) - Checks whether a string contains only characters specified in the gama.
  • hasUppercase($string)
  • hasNumber($string)
  • hasSubstring($string, $substring)
  • isEmail($email)
  • leftFrom($string, $match)
  • maxWords($string, $num, $suffix = '') - Returns the first $num words of $string
  • p2br($string) - Converts a well-formed string with <p> tags to string with <br /> tags
  • random($length = 8, $string = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890") - Returns a random string.
  • regexSurround($string,$regex,$prefix,$postfix) - Surrounds a matching regex with prefix and postfix string
  • regexReplace($string,$regex,$replacementWithMatches) - Replaces a matching regex with match aware replacement string
  • rightFrom($string, $match)
  • slugify($string) - Creates a friendly URL slug from a string
  • snakify($string, $separator = " ", $remove_separator = false)
  • splitId($string) - Given a string such as "comment_123" or "id_57", it returns the id
  • startsWith($string, $match) - Checks if a string starts with another string.
  • substringBetween($string, $match_left, $match_right, $ignore_case = false)
  • toWords($string) - Splits a string to words

The Versions

01/07 2018

dev-master

9999999-dev http://github.com/sinevia/php-library-utils

PHP Library String Utils

  Sources   Download

proprietary

php library string utils sinevia

09/06 2018

v1.0.2

1.0.2.0 http://github.com/sinevia/php-library-utils

PHP Library String Utils

  Sources   Download

proprietary

php library string utils sinevia

01/06 2018

v1.0.1

1.0.1.0 http://github.com/sinevia/php-library-utils

PHP Library String Utils

  Sources   Download

proprietary

php library string utils sinevia

28/01 2018

v1.0.0

1.0.0.0 http://github.com/sinevia/php-library-utils

PHP Library String Utils

  Sources   Download

proprietary

php library string utils sinevia