1
0
mirror of https://github.com/danielstjules/Stringy.git synced 2025-09-02 17:42:58 +02:00

63 Commits

Author SHA1 Message Date
Daniel St. Jules
c230885a13 Require objects to have a __toString method, update readme 2013-12-15 01:08:23 -05:00
Daniel St. Jules
1f25d0c793 Merge Pull Request #18 2013-12-15 00:15:34 -05:00
Ivan Kerin
d54628e6ae Support Bulgarian in toAscii
The “proper” bulgarian translitaration should encode ь to y [1],
However, since its not really that important to understand the actual
word, very rearly used and breaks compatibility with Russian, it might
be best to just leave it be, since Russian is a much larger torget.

[1] http://en.wikipedia.org/wiki/Romanization_of_Bulgarian
2013-12-13 11:05:23 +00:00
gotterdemarung
3458fd79fd Stringy->$str became private to ensure its sting content and guarantee zero-exception __toString() execution 2013-12-10 22:34:19 +02:00
gotterdemarung
6e5e5e055f primitives check in constructor & toString 2013-12-10 22:19:42 +02:00
gotterdemarung
75404a0338 Stringy must correctly handle non-string arguments and implicitly cast to string to avoid problems in __toString() method 2013-12-10 22:15:28 +02:00
Glynn Forrest
906f217dc1 Adding optional $replacement parameter to slugify. 2013-11-26 14:11:41 +00:00
Daniel St. Jules
f6085ed2cb Cleanup tests a bit
Getting over my irrational fear of multi-line return statements
2013-09-27 20:13:04 -04:00
Daniel St. Jules
88145e83e8 Update replace() to correctly apply preg_quote to pattern and replacement 2013-09-14 23:59:46 -04:00
Daniel St. Jules
9bd5a9c0c8 Added regexReplace() 2013-09-14 23:45:18 -04:00
Daniel St. Jules
41ea0277b2 Added $caseSensitive to count() 2013-09-14 14:58:11 -04:00
Daniel St. Jules
61cd5f5f4d Added toLowerCase() and toUpperCase() 2013-09-14 11:22:52 -04:00
Daniel St. Jules
ea20aebc91 Added $caseSensitive to contains() 2013-09-14 01:32:52 -04:00
Daniel St. Jules
02da00c433 Merge branch 'pr/12' 2013-09-05 22:41:19 -04:00
Borales
07f23d6165 Adding cyrillic letters 2013-09-04 18:23:50 +03:00
ChristianGaertner
bc175f0e12 Added test to cover 100% + fixed fatal error 2013-09-04 08:02:56 +02:00
Daniel St. Jules
a667c4aa6a Fix and merge branch 'isJson' 2013-08-31 19:12:46 -04:00
Lucas
cd5e897ac3 isJson() function, with tests 2013-08-31 18:43:16 -04:00
Daniel St. Jules
390671e131 Cleanup and merge branch 'isserialized' 2013-08-31 18:37:58 -04:00
Lucas
0b76c56333 function isSerialized(), with tests 2013-08-31 18:20:39 -04:00
Daniel St. Jules
5f35226926 Merge branch 'better-construct', update testConstruct and create 2013-08-27 01:34:44 -04:00
Daniel St. Jules
11f961cae6 Fixed testShuffle. It now tests that each mb char has the same number of occurrences before and after 2013-08-24 11:19:33 -04:00
Lucas
660b1d6de8 Added simple constructor test 2013-08-24 14:32:43 +02:00
Lucas
a1d9787309 Added isHexadecimal 2013-08-22 15:40:43 +02:00
Daniel St. Jules
f1abc38c17 Fix for collapseWhitespace() not being able to handle multibyte space characters 2013-08-06 22:39:47 -04:00
Daniel St. Jules
7a64dad935 Remove dummy test from CommonTest.php 2013-08-06 22:16:53 -04:00
Daniel St. Jules
f0063f8bac Cleanup and fixes for 1.0.0 Release 2013-08-01 00:53:54 -04:00
Daniel St. Jules
b1cdc7603f Add count() and replace() 2013-07-28 23:21:44 -04:00
Daniel St. Jules
a829f2d244 Stringy methods now return a new Stringy object, rather than modifying the original 2013-07-28 18:43:08 -04:00
Daniel St. Jules
88b8a8a6ef Added isAlpha(), isAlphanumeric(), isBlank(), isLowerCase() and isUpperCase() 2013-07-27 23:56:07 -04:00
Daniel St. Jules
a93955162e Add removeLeft() and removeRight() 2013-07-27 17:57:43 -04:00
Daniel St. Jules
6d927fbf5d Added ensureLeft() and ensureRight() 2013-07-27 16:33:27 -04:00
Daniel St. Jules
4828811a48 Added truncate() 2013-07-27 15:39:36 -04:00
Daniel St. Jules
77ae682de1 Add first() and last() 2013-07-27 14:41:29 -04:00
Daniel St. Jules
f3ac2bf1f3 Added at() 2013-07-27 13:57:30 -04:00
Daniel St. Jules
d757ce38de Added substr() 2013-07-27 13:09:11 -04:00
Daniel St. Jules
95e706fe31 Added length() 2013-07-27 11:53:48 -04:00
Daniel St. Jules
332ceb4224 Added longestCommonSubstring 2013-07-27 02:47:58 -04:00
Daniel St. Jules
aeef5493c0 Add longestCommonPrefix and longestCommonSuffix 2013-07-26 23:56:04 -04:00
Daniel St. Jules
cfeadbfacc StaticStringy should return strings and not Stringy objects, add tests for trim 2013-07-26 20:51:03 -04:00
Daniel St. Jules
ffe9d769d7 Make Stringy\Stringy OO, and add Stringy\StaticStringy 2013-07-25 01:57:13 -04:00
Daniel St. Jules
26ee99743c Update readme with todo items, rename truncate to safeTruncate, and clean to collapseWhitespace 2013-07-24 00:42:53 -04:00
Daniel St. Jules
e8664d3bde Move curly braces and remove closing tags to accommodate PSR-1 and PSR-2 2013-07-23 23:53:08 -04:00
Daniel St. Jules
49dd8bdbc2 Add shuffle() 2013-07-23 01:52:49 -04:00
Daniel St. Jules
c5816ad928 Update test and readme 2013-07-23 01:13:31 -04:00
Daniel St. Jules
4bb791e318 Add reverse() 2013-07-23 01:11:13 -04:00
Daniel St. Jules
1e2f49128b Add truncate() and a couple small fixes 2013-07-23 00:46:51 -04:00
Daniel St. Jules
ca4a924ba9 Add surround and insert 2013-07-22 23:22:38 -04:00
Daniel St. Jules
8ddb4b91b5 Add contains() 2013-07-22 00:54:19 -04:00
Daniel St. Jules
feb4c5a36d Add slugify 2013-07-21 23:07:31 -04:00