-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathREADME
executable file
·45 lines (28 loc) · 1.14 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
ZF_Utils
This repository serves to store a series of classes to use with Zend framework 1.x.
In the future i'll check for compatibility with version 2.
/******************************************************************/
* StringUtils
/******************************************************************/
This class is a set of tools i offen use when working with strings.
This class can be used out of Zend Framework as well.
USAGE:
$test = new Look_StringUtils();
$string = "i deal with strings";
$test->underscore($string);
//output will be: i_deal_with_strings
String methods avaliable:
* normalize
normalize's text for use in HTML, example: "olá mãe" will become "olá mãe"
* word_replace
Replaces a word for another in a given string
* camelize
Take a string remove spaces and join the words as CamelCase.
* repeater
repeats a string X number of times
* underscore
Takes a string and replace spaces with underscore
* humanize
Takes multiple words separated by underscores and adds spaces between them. Each word is capitalized.
* Truncate
Cuts a string to a given length and adds ... at the end