php – ltrim

ltrim

(PHP 4, PHP 5)

ltrim — Strip whitespace (or other characters) from the beginning of a string

Description
string ltrim ( string $str [, string $charlist] )

Note: The second parameter was added in PHP 4.1.0

This function returns a string with whitespace stripped from the beginning of str. Without the second parameter, ltrim() will strip these characters:

” ” (ASCII 32 (0x20)), an ordinary space.
“\t” (ASCII 9 (0x09)), a tab.
“\n” (ASCII 10 (0x0A)), a new line (line feed).
“\r” (ASCII 13 (0x0D)), a carriage return.
“” (ASCII 0 (0x00)), the NUL-byte.
“\x0B” (ASCII 11 (0x0B)), a vertical tab.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: