diff options
author | Greg Aker <greg@gregaker.net> | 2011-08-20 20:58:37 +0200 |
---|---|---|
committer | Greg Aker <greg@gregaker.net> | 2011-08-20 20:58:37 +0200 |
commit | 394d8c5bd3e04bd7992793ca7c648f4306a9539d (patch) | |
tree | d061b4339f2c3f30428256efae741ab04fd2bf6e /user_guide/helpers/string_helper.html | |
parent | 43194ea1af658914a89ca49aed4dca4617b9c4ff (diff) | |
parent | d56be70257696d0bbf2dcc880888d8dc17cba21c (diff) |
Merge branch 'develop' of github.com:EllisLab/CodeIgniter into develop
Diffstat (limited to 'user_guide/helpers/string_helper.html')
-rw-r--r-- | user_guide/helpers/string_helper.html | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/user_guide/helpers/string_helper.html b/user_guide/helpers/string_helper.html index a3dc16598..314124037 100644 --- a/user_guide/helpers/string_helper.html +++ b/user_guide/helpers/string_helper.html @@ -90,6 +90,17 @@ String Helper <code>echo random_string('alnum', 16);</code> +<h2>increment_string()</h2> + +<p>Increments a string by appending a number to it or increasing the number. Useful for creating "copies" or a file or duplicating database content which has unique titles or slugs.</p> + +<p>Usage example:</p> + +<code>echo increment_string('file', '_'); // "file_1"<br/> +echo increment_string('file', '-', 2); // "file-2"<br/> +echo increment_string('file-4'); // "file-5"<br/></code> + + <h2>alternator()</h2> <p>Allows two or more items to be alternated between, when cycling through a loop. Example:</p> |