From dbac73b4011a85c4ac3b3a7a6a8e30533b881155 Mon Sep 17 00:00:00 2001 From: Phil Sturgeon Date: Sun, 14 Aug 2011 12:23:55 -0600 Subject: Added increment_string() docs and changelog. --- user_guide/changelog.html | 1 + user_guide/helpers/string_helper.html | 11 +++++++++++ 2 files changed, 12 insertions(+) (limited to 'user_guide') diff --git a/user_guide/changelog.html b/user_guide/changelog.html index 8f0fad783..20b1c4e49 100644 --- a/user_guide/changelog.html +++ b/user_guide/changelog.html @@ -70,6 +70,7 @@ Change Log
  • Helpers
  • Database diff --git a/user_guide/helpers/string_helper.html b/user_guide/helpers/string_helper.html index 169ee4ebb..7c1d30c59 100644 --- a/user_guide/helpers/string_helper.html +++ b/user_guide/helpers/string_helper.html @@ -90,6 +90,17 @@ String Helper echo random_string('alnum', 16); +

    increment_string()

    + +

    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.

    + +

    Usage example:

    + +echo increment_string('file', '_'); // "file_1"
    +echo increment_string('file', '-', 2); // "file-2"
    +echo increment_string('file-4'); // "file-5"
    + +

    alternator()

    Allows two or more items to be alternated between, when cycling through a loop. Example:

    -- cgit v1.2.3-24-g4f1b