From 4b9c62980599228f070b401c7673dce8085b0c61 Mon Sep 17 00:00:00 2001 From: Derek Jones Date: Fri, 1 Jul 2011 17:40:48 -0500 Subject: backed out 648b42a75739, which was a NON-trivial whitespace commit. It broke the Typography class's string replacements, for instance --- user_guide/helpers/text_helper.html | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) (limited to 'user_guide/helpers/text_helper.html') diff --git a/user_guide/helpers/text_helper.html b/user_guide/helpers/text_helper.html index 3c83f3d42..f71d87840 100644 --- a/user_guide/helpers/text_helper.html +++ b/user_guide/helpers/text_helper.html @@ -71,22 +71,22 @@ Text Helper

word_limiter()

-

Truncates a string to the number of words specified. Example:

+

Truncates a string to the number of words specified. Example:

$string = "Here is a nice text string consisting of eleven words.";

$string = word_limiter($string, 4);

-// Returns: Here is a nice… +// Returns: Here is a nice…
-

The third parameter is an optional suffix added to the string. By default it adds an ellipsis.

+

The third parameter is an optional suffix added to the string. By default it adds an ellipsis.

character_limiter()

-

Truncates a string to the number of characters specified. It maintains the integrity +

Truncates a string to the number of characters specified. It maintains the integrity of words so the character count may be slightly more or less then what you specify. Example:

@@ -94,7 +94,7 @@ $string = "Here is a nice text string consisting of eleven words.";

$string = character_limiter($string, 20);

-// Returns: Here is a nice text string… +// Returns: Here is a nice text string…

The third parameter is an optional suffix added to the string, if undeclared this helper uses an ellipsis.

@@ -125,9 +125,9 @@ part it should correctly identify characters outside the normal range (like acce

word_censor()

-

Enables you to censor words within a text string. The first parameter will contain the original string. The -second will contain an array of words which you disallow. The third (optional) parameter can contain a replacement value -for the words. If not specified they are replaced with pound signs: ####. Example:

+

Enables you to censor words within a text string. The first parameter will contain the original string. The +second will contain an array of words which you disallow. The third (optional) parameter can contain a replacement value +for the words. If not specified they are replaced with pound signs: ####. Example:

$disallowed = array('darn', 'shucks', 'golly', 'phooey');
@@ -137,7 +137,7 @@ $string = word_censor($string, $disallowed, 'Beep!');

highlight_code()

-

Colorizes a string of code (PHP, HTML, etc.). Example:

+

Colorizes a string of code (PHP, HTML, etc.). Example:

$string = highlight_code($string); @@ -146,9 +146,9 @@ $string = word_censor($string, $disallowed, 'Beep!');

highlight_phrase()

-

Will highlight a phrase within a text string. The first parameter will contain the original string, the second will -contain the phrase you wish to highlight. The third and fourth parameters will contain the opening/closing HTML tags -you would like the phrase wrapped in. Example:

+

Will highlight a phrase within a text string. The first parameter will contain the original string, the second will +contain the phrase you wish to highlight. The third and fourth parameters will contain the opening/closing HTML tags +you would like the phrase wrapped in. Example:

$string = "Here is a nice text string about nothing in particular.";
@@ -164,7 +164,7 @@ $string = highlight_phrase($string, "nice text", '<span style="color:#990000"

word_wrap()

-

Wraps text at the specified character count while maintaining complete words. Example:

+

Wraps text at the specified character count while maintaining complete words. Example:

$string = "Here is a simple string of text that will help us demonstrate this function.";

@@ -180,8 +180,8 @@ function

ellipsize()

This function will strip tags from a string, split it at a defined maximum length, and insert an ellipsis.

-

The first parameter is the string to ellipsize, the second is the number of characters in the final string. The third parameter is where in the string the ellipsis should appear from 0 - 1, left to right. For example. a value of 1 will place the ellipsis at the right of the string, .5 in the middle, and 0 at the left.

-

An optional forth parameter is the kind of ellipsis. By default, &hellip; will be inserted.

+

The first parameter is the string to ellipsize, the second is the number of characters in the final string. The third parameter is where in the string the ellipsis should appear from 0 - 1, left to right. For example. a value of 1 will place the ellipsis at the right of the string, .5 in the middle, and 0 at the left.

+

An optional forth parameter is the kind of ellipsis. By default, &hellip; will be inserted.

$str = 'this_string_is_entirely_too_long_and_might_break_my_design.jpg';

-- cgit v1.2.3-24-g4f1b From b8c038a3e7742f32915d7f1ab69627075e8d0c39 Mon Sep 17 00:00:00 2001 From: Derek Jones Date: Sat, 20 Aug 2011 08:57:14 -0500 Subject: updated version number in user guide, removed some stray merge markers found in the change log --- user_guide/helpers/text_helper.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'user_guide/helpers/text_helper.html') diff --git a/user_guide/helpers/text_helper.html b/user_guide/helpers/text_helper.html index f71d87840..496eccb73 100644 --- a/user_guide/helpers/text_helper.html +++ b/user_guide/helpers/text_helper.html @@ -28,7 +28,7 @@
- +

CodeIgniter User Guide Version 2.0.2

CodeIgniter User Guide Version 2.0.3

-- cgit v1.2.3-24-g4f1b