From 37f4b9caa02783e06dd7c5318200113409a0deb1 Mon Sep 17 00:00:00 2001 From: Derek Jones Date: Fri, 1 Jul 2011 17:56:50 -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