2017 © Pedro Peláez
 

library helpers-string

Collection of useful php string helpers.

image

weew/helpers-string

Collection of useful php string helpers.

  • Monday, December 19, 2016
  • by weew
  • Repository
  • 1 Watchers
  • 1 Stars
  • 22,933 Installations
  • PHP
  • 19 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 25 Versions
  • 14 % Grown

The README.md

String helpers

Build Status Test Coverage Version Licence, (*1)

Table of contents

Installation

composer install weew/helpers-string, (*2)

Introduction

This tiny library provides various helper functions to deal with common string manipulation related problems., (*3)

Functions

s

Simple helper to format strings. Supports placeholders like :key and %s., (*4)

string s(string $format, mixed $args [, mixed $...]), (*5)

str_starts_with

Check if a string starts with the given sequence., (*6)

bool str_starts_with(string $string, string $search [, bool $caseSensitive = false]), (*7)

str_ends_with

heck if a string ends with the given sequence., (*8)

bool str_ends_with(string $string, string $search [, bool $caseSensitive = false]), (*9)

url

Combine multiple strings to a url. This function makes sure the pieces are properly glued together with a / and eliminates all //, except after the protocol., (*10)

string url(string $paths [, $...]), (*11)

path

Combine multiple strings to a path. Glues pieces together with the proper directory separator and eliminates all // or \\., (*12)

string path(string $paths [, $...]), (*13)

get_type

Get type of a value. Returns values like int, string, function. Objects will return its class name., (*14)

string get_type(mixed $abstract), (*15)

str_snake_case

Convert string to snake_case., (*16)

string str_snake_case(string $string), (*17)

str_studly_caps

Convert string to StudlyCase., (*18)

string str_studly_caps(string $string [, array $delimiters = ['-', '_']]), (*19)

str_camel_case

Convert a string to camelCase., (*20)

string str_camel_case(string $string [, array $delimiters = ['-', '_']]), (*21)

str_random

Generate a random alphanumeric string. Works only with even numbers., (*22)

string str_random([int $length = 10]), (*23)

str_explode

Split a string by one or multiple delimiters. Works the same way as the explode function, but allows several delimiters., (*24)

string str_explode(string $string, string|array $delimiter [, int $limit = PHP_INT_MAX]), (*25)

uuid

Generate a v4 uuid., (*26)

string uuid([string $prefix = null, int $length = 36]), (*27)

uuid_format

Format string as a v4 uuid., (*28)

string uuid_format(string $string [, string $prefix = null, int $length = null]), (*29)

simple_uuid

Generate a uuid of a simpler format., (*30)

string simple_uuid(), (*31)

format_xml

Format an xml string., (*32)

string format_xml($string), (*33)

The Versions

19/12 2016

dev-master

9999999-dev

Collection of useful php string helpers.

  Sources   Download

MIT

The Development Requires

by Maxim Kott

19/12 2016

v1.10.0

1.10.0.0

Collection of useful php string helpers.

  Sources   Download

MIT

The Development Requires

by Maxim Kott

21/07 2016

v1.9.1

1.9.1.0

Collection of useful php string helpers.

  Sources   Download

MIT

The Development Requires

by Maxim Kott

21/06 2016

v1.9.0

1.9.0.0

Collection of useful php string helpers.

  Sources   Download

MIT

The Development Requires

by Maxim Kott

28/04 2016

v1.8.0

1.8.0.0

Collection of useful php string helpers.

  Sources   Download

MIT

The Development Requires

by Maxim Kott

02/04 2016

v1.7.0

1.7.0.0

Collection of useful php string helpers.

  Sources   Download

MIT

The Development Requires

by Maxim Kott

29/03 2016

v1.6.1

1.6.1.0

Collection of useful php string helpers.

  Sources   Download

MIT

The Development Requires

by Maxim Kott

15/03 2016

v1.6.0

1.6.0.0

Collection of useful php string helpers.

  Sources   Download

MIT

The Development Requires

by Maxim Kott

15/03 2016

v1.5.0

1.5.0.0

Collection of useful php string helpers.

  Sources   Download

MIT

The Development Requires

by Maxim Kott

15/03 2016

v1.4.0

1.4.0.0

Collection of useful php string helpers.

  Sources   Download

MIT

The Development Requires

by Maxim Kott

09/03 2016

v1.3.0

1.3.0.0

Collection of useful php string helpers.

  Sources   Download

MIT

The Development Requires

by Maxim Kott

19/01 2016

v1.2.0

1.2.0.0

Collection of useful php string helpers.

  Sources   Download

MIT

The Development Requires

by Maxim Kott

24/12 2015

v1.1.0

1.1.0.0

Collection of useful php string helpers.

  Sources   Download

MIT

The Development Requires

by Maxim Kott

13/11 2015

v1.0.0

1.0.0.0

Collection of useful php string helpers.

  Sources   Download

MIT

The Development Requires

by Maxim Kott

13/11 2015

v0.0.11

0.0.11.0

Collection of useful php string helpers.

  Sources   Download

MIT

The Development Requires

by Maxim Kott

19/10 2015

v0.0.10

0.0.10.0

Collection of useful php string helpers.

  Sources   Download

MIT

The Development Requires

by Maxim Kott

10/09 2015

v0.0.9

0.0.9.0

Collection of useful php string helpers.

  Sources   Download

MIT

The Development Requires

by Maxim Kott

10/09 2015

v0.0.8

0.0.8.0

Collection of useful php string helpers.

  Sources   Download

MIT

The Development Requires

by Maxim Kott

09/09 2015

v0.0.7

0.0.7.0

Collection of useful php string helpers.

  Sources   Download

MIT

The Development Requires

by Maxim Kott

07/09 2015

v0.0.6

0.0.6.0

Collection of useful php string helpers.

  Sources   Download

MIT

The Development Requires

by Maxim Kott

19/08 2015

v0.0.5

0.0.5.0

Collection of useful php string helpers.

  Sources   Download

MIT

The Development Requires

by Maxim Kott

19/08 2015

v0.0.4

0.0.4.0

Collection of useful php string helpers.

  Sources   Download

MIT

The Development Requires

by Maxim Kott

19/08 2015

v0.0.3

0.0.3.0

Collection of useful php string helpers.

  Sources   Download

MIT

The Development Requires

by Maxim Kott

05/08 2015

v0.0.2

0.0.2.0

Collection of useful php string helpers.

  Sources   Download

MIT

The Development Requires

by Maxim Kott

21/07 2015

v0.0.1

0.0.1.0

Collection of useful php string helpers.

  Sources   Download

MIT

The Development Requires

by Maxim Kott