diff options
Diffstat (limited to 'user_guide_src/source/helpers')
-rw-r--r-- | user_guide_src/source/helpers/inflector_helper.rst | 6 | ||||
-rw-r--r-- | user_guide_src/source/helpers/string_helper.rst | 2 | ||||
-rw-r--r-- | user_guide_src/source/helpers/text_helper.rst | 5 |
3 files changed, 12 insertions, 1 deletions
diff --git a/user_guide_src/source/helpers/inflector_helper.rst b/user_guide_src/source/helpers/inflector_helper.rst index cf246b9de..cc46a1851 100644 --- a/user_guide_src/source/helpers/inflector_helper.rst +++ b/user_guide_src/source/helpers/inflector_helper.rst @@ -77,3 +77,9 @@ them. Each word is capitalized. Example $word = "my_dog_spot"; echo humanize($word); // Returns "My Dog Spot" +To use dashes instead of underscores + +:: + + $word = "my-dog-spot"; + echo humanize($word, '-'); // Returns "My Dog Spot"
\ No newline at end of file diff --git a/user_guide_src/source/helpers/string_helper.rst b/user_guide_src/source/helpers/string_helper.rst index b8a69e036..dc70e461a 100644 --- a/user_guide_src/source/helpers/string_helper.rst +++ b/user_guide_src/source/helpers/string_helper.rst @@ -58,7 +58,7 @@ Usage example echo increment_string('file', '_'); // "file_1" echo increment_string('file', '-', 2); // "file-2" - echo increment_string('file-4'); // "file-5" + echo increment_string('file_4'); // "file_5" alternator() ============ diff --git a/user_guide_src/source/helpers/text_helper.rst b/user_guide_src/source/helpers/text_helper.rst index e97643275..8cb2d6f96 100644 --- a/user_guide_src/source/helpers/text_helper.rst +++ b/user_guide_src/source/helpers/text_helper.rst @@ -46,6 +46,9 @@ more or less then what you specify. Example The third parameter is an optional suffix added to the string, if undeclared this helper uses an ellipsis. +**Note:** If you need to truncate to an exact number of characters please see +the :ref:`ellipsize` function below. + ascii_to_entities() =================== @@ -136,6 +139,8 @@ complete words. Example // Would produce: Here is a simple string of text that will help us demonstrate this function +.. _ellipsize: + ellipsize() =========== |