TeamSpeak 3 PHP Framework
Modern use-at-will framework that provides individual components to manage TeamSpeak 3 Server instances
TeamSpeak3_Helper_String Class Reference

Helper class for string handling. More...

Inherits ArrayAccess, Iterator, and Countable.

Public Member Functions

 __construct ($string)
 The TeamSpeak3_Helper_String constructor. More...
 
 __call ($function, $args)
 Magical function that allows you to call PHP's built-in string functions on the TeamSpeak3_Helper_String object. More...
 
 __toString ()
 Returns the character as a standard string. More...
 
 append ($part)
 Appends $part to the string. More...
 
 arg (array $args, $char="%")
 This function replaces indexed or associative signs with given values. More...
 
 contains ($pattern, $regexp=FALSE)
 Returns true if the string contains $pattern. More...
 
 count ()
 
 current ()
 
 endsWith ($pattern)
 Returns true if the string ends with $pattern. More...
 
 escape ()
 Escapes a string using the TeamSpeak 3 escape patterns. More...
 
 filterAlnum ()
 Removes any non alphanumeric characters from the string. More...
 
 filterAlpha ()
 Removes any non alphabetic characters from the string. More...
 
 filterDigits ()
 Removes any non numeric characters from the string. More...
 
 findFirst ($needle)
 Returns the position of the first occurrence of a char in a string. More...
 
 findLast ($needle)
 Returns the position of the last occurrence of a char in a string. More...
 
 isInt ()
 Returns TRUE if the string is a numeric value. More...
 
 isUtf8 ()
 Returns TRUE if the string is UTF-8 encoded. More...
 
 key ()
 
 next ()
 
 offsetExists ($offset)
 
 offsetGet ($offset)
 
 offsetSet ($offset, $value)
 
 offsetUnset ($offset)
 
 prepend ($part)
 Prepends $part to the string. More...
 
 replace ($search, $replace, $caseSensitivity=TRUE)
 Replaces every occurrence of the string $search with the string $replace. More...
 
 resize ($size, $char="\)
 Sets the size of the string to $size characters. More...
 
 rewind ()
 
 section ($separator, $first=0, $last=0)
 Returns a section of the string. More...
 
 spaceToPercent ()
 Replaces space characters with percent encoded strings. More...
 
 split ($separator, $limit=0)
 Splits the string into substrings wherever $separator occurs. More...
 
 startsWith ($pattern)
 Returns true if the string starts with $pattern. More...
 
 substr ($start, $length=null)
 Returns part of a string. More...
 
 toBase64 ()
 Encodes the string with MIME base64 and returns the result. More...
 
 toCrc32 ()
 Calculates and returns the crc32 polynomial of the string. More...
 
 toHex ()
 Returns the hexadecimal value of the string. More...
 
 toInt ()
 Returns the integer value of the string. More...
 
 toLower ()
 Returns the lowercased string. More...
 
 toMd5 ()
 Calculates and returns the md5 checksum of the string. More...
 
 toSha1 ()
 Calculates and returns the sha1 checksum of the string. More...
 
 toString ()
 Returns the string as a standard string. More...
 
 toUpper ()
 Returns the uppercased string. More...
 
 toUtf8 ()
 Converts the string to UTF-8. More...
 
 transliterate ()
 Returns the string transliterated from UTF-8 to Latin. More...
 
 trim ()
 Strips whitespaces (or other characters) from the beginning and end of the string. More...
 
 unescape ()
 Unescapes a string using the TeamSpeak 3 escape patterns. More...
 
 uriSafe ($spacer="-")
 Processes the string and replaces all accented UTF-8 characters by unaccented ASCII-7 "equivalents", whitespaces are replaced by a pre-defined spacer and the string is lowercase. More...
 
 valid ()
 

Static Public Member Functions

static factory ($string)
 Returns a TeamSpeak3_Helper_String object for thegiven string. More...
 
static fromBase64 ($base64)
 Decodes the string with MIME base64 and returns the result as an TeamSpeak3_Helper_String. More...
 
static fromHex ($hex)
 Returns the TeamSpeak3_Helper_String based on a given hex value. More...
 

Protected Attributes

 $position = 0
 

Detailed Description

Helper class for string handling.

Constructor & Destructor Documentation

◆ __construct()

__construct (   $string)

The TeamSpeak3_Helper_String constructor.

Parameters
string$string
Returns
TeamSpeak3_Helper_String
50  {
51  $this->string = (string) $string;
52  }

Member Function Documentation

◆ __call()

__call (   $function,
  $args 
)

Magical function that allows you to call PHP's built-in string functions on the TeamSpeak3_Helper_String object.

Parameters
string$function
array$args
Exceptions
TeamSpeak3_Helper_Exception
Returns
TeamSpeak3_Helper_String
807  {
808  if(!function_exists($function))
809  {
810  throw new TeamSpeak3_Helper_Exception("cannot call undefined function '" . $function . "' on this object");
811  }
812 
813  if(count($args))
814  {
815  if(($key = array_search($this, $args, TRUE)) !== FALSE)
816  {
817  $args[$key] = $this->string;
818  }
819  else
820  {
821  throw new TeamSpeak3_Helper_Exception("cannot call undefined function '" . $function . "' without the " . __CLASS__ . " object parameter");
822  }
823 
824  $return = call_user_func_array($function, $args);
825  }
826  else
827  {
828  $return = call_user_func($function, $this->string);
829  }
830 
831  if(is_string($return))
832  {
833  $this->string = $return;
834  }
835  else
836  {
837  return $return;
838  }
839 
840  return $this;
841  }
Enhanced exception class for TeamSpeak3_Helper_* objects.
Definition: Exception.php:29
count()
Definition: String.php:856

◆ __toString()

__toString ( )

Returns the character as a standard string.

Returns
string
849  {
850  return (string) $this->string;
851  }

◆ append()

append (   $part)

Appends $part to the string.

Parameters
string$part
Returns
TeamSpeak3_Helper_String
237  {
238  $this->string = $this->string . strval($part);
239 
240  return $this;
241  }

◆ arg()

arg ( array  $args,
  $char = "%" 
)

This function replaces indexed or associative signs with given values.

Parameters
array$args
string$char
Returns
TeamSpeak3_Helper_String
95  {
96  $args = array_reverse($args, TRUE);
97 
98  foreach($args as $key => $val)
99  {
100  $args[$char . $key] = $val;
101  unset($args[$key]);
102  }
103 
104  $this->string = strtr($this->string, $args);
105 
106  return $this;
107  }

◆ contains()

contains (   $pattern,
  $regexp = FALSE 
)

Returns true if the string contains $pattern.

Parameters
string$pattern
boolean$regexp
Returns
boolean
181  {
182  if(empty($pattern))
183  {
184  return TRUE;
185  }
186 
187  if($regexp)
188  {
189  return (preg_match("/" . $pattern . "/i", $this->string)) ? TRUE : FALSE;
190  }
191  else
192  {
193  return (stristr($this->string, $pattern) !== FALSE) ? TRUE : FALSE;
194  }
195  }

◆ endsWith()

endsWith (   $pattern)

Returns true if the string ends with $pattern.

Parameters
string$pattern
Returns
boolean
127  {
128  return (substr($this->string, strlen($pattern)*-1) == $pattern) ? TRUE : FALSE;
129  }
substr($start, $length=null)
Returns part of a string.
Definition: String.php:204

◆ escape()

escape ( )

Escapes a string using the TeamSpeak 3 escape patterns.

Returns
TeamSpeak3_Helper_String
329  {
330  foreach(TeamSpeak3::getEscapePatterns() as $search => $replace)
331  {
332  $this->string = str_replace($search, $replace, $this->string);
333  }
334 
335  return $this;
336  }
static getEscapePatterns()
Returns an assoc array containing all escape patterns available on a TeamSpeak 3 Server.
Definition: TeamSpeak3.php:554

◆ factory()

static factory (   $string)
static

Returns a TeamSpeak3_Helper_String object for thegiven string.

Parameters
string$string
Returns
TeamSpeak3_Helper_String
61  {
62  return new self($string);
63  }

◆ filterAlnum()

filterAlnum ( )

Removes any non alphanumeric characters from the string.

Returns
TeamSpeak3_Helper_String
356  {
357  $this->string = preg_replace("/[^[:alnum:]]/", "", $this->string);
358 
359  return $this;
360  }

◆ filterAlpha()

filterAlpha ( )

Removes any non alphabetic characters from the string.

Returns
TeamSpeak3_Helper_String
368  {
369  $this->string = preg_replace("/[^[:alpha:]]/", "", $this->string);
370 
371  return $this;
372  }

◆ filterDigits()

filterDigits ( )

Removes any non numeric characters from the string.

Returns
TeamSpeak3_Helper_String
380  {
381  $this->string = preg_replace("/[^[:digit:]]/", "", $this->string);
382 
383  return $this;
384  }

◆ findFirst()

findFirst (   $needle)

Returns the position of the first occurrence of a char in a string.

Parameters
string$needle
Returns
integer
138  {
139  return strpos($this->string, $needle);
140  }

◆ findLast()

findLast (   $needle)

Returns the position of the last occurrence of a char in a string.

Parameters
string$needle
Returns
integer
149  {
150  return strrpos($this->string, $needle);
151  }

◆ fromBase64()

static fromBase64 (   $base64)
static

Decodes the string with MIME base64 and returns the result as an TeamSpeak3_Helper_String.

Parameters
string$base64
Returns
TeamSpeak3_Helper_String
495  {
496  return new self(base64_decode($base64));
497  }

◆ fromHex()

static fromHex (   $hex)
static

Returns the TeamSpeak3_Helper_String based on a given hex value.

Parameters
string$hex
Exceptions
TeamSpeak3_Helper_Exception
Returns
TeamSpeak3_Helper_String
524  {
525  $string = "";
526 
527  if(strlen($hex)%2 == 1)
528  {
529  throw new TeamSpeak3_Helper_Exception("given parameter '" . $hex . "' is not a valid hexadecimal number");
530  }
531 
532  foreach(str_split($hex, 2) as $chunk)
533  {
534  $string .= chr(hexdec($chunk));
535  }
536 
537  return new self($string);
538  }
Enhanced exception class for TeamSpeak3_Helper_* objects.
Definition: Exception.php:29

◆ isInt()

isInt ( )

Returns TRUE if the string is a numeric value.

Returns
boolean
392  {
393  return (is_numeric($this->string) && !$this->contains(".") && !$this->contains("x")) ? TRUE : FALSE;
394  }
contains($pattern, $regexp=FALSE)
Returns true if the string contains $pattern.
Definition: String.php:180

◆ isUtf8()

isUtf8 ( )

Returns TRUE if the string is UTF-8 encoded.

This method searches for non-ascii multibyte sequences in the UTF-8 range.

Returns
boolean
449  {
450  $pattern = array();
451 
452  $pattern[] = "[\xC2-\xDF][\x80-\xBF]"; // non-overlong 2-byte
453  $pattern[] = "\xE0[\xA0-\xBF][\x80-\xBF]"; // excluding overlongs
454  $pattern[] = "[\xE1-\xEC\xEE\xEF][\x80-\xBF]{2}"; // straight 3-byte
455  $pattern[] = "\xED[\x80-\x9F][\x80-\xBF]"; // excluding surrogates
456  $pattern[] = "\xF0[\x90-\xBF][\x80-\xBF]{2}"; // planes 1-3
457  $pattern[] = "[\xF1-\xF3][\x80-\xBF]{3}"; // planes 4-15
458  $pattern[] = "\xF4[\x80-\x8F][\x80-\xBF]{2}"; // plane 16
459 
460  return preg_match("%(?:" . implode("|", $pattern) . ")+%xs", $this->string);
461  }

◆ prepend()

prepend (   $part)

Prepends $part to the string.

Parameters
string$part
Returns
TeamSpeak3_Helper_String
250  {
251  $this->string = strval($part) . $this->string;
252 
253  return $this;
254  }

◆ replace()

replace (   $search,
  $replace,
  $caseSensitivity = TRUE 
)

Replaces every occurrence of the string $search with the string $replace.

Parameters
string$search
string$replace
boolean$caseSensitivity
Returns
TeamSpeak3_Helper_String
74  {
75  if($caseSensitivity)
76  {
77  $this->string = str_replace($search, $replace, $this->string);
78  }
79  else
80  {
81  $this->string = str_ireplace($search, $replace, $this->string);
82  }
83 
84  return $this;
85  }

◆ resize()

resize (   $size,
  $char = "\0" 
)

Sets the size of the string to $size characters.

Parameters
integer$size
string$char
Returns
TeamSpeak3_Helper_String
296  {
297  $chars = ($size - $this->count());
298 
299  if($chars < 0)
300  {
301  $this->string = substr($this->string, 0, $chars);
302  }
303  elseif($chars > 0)
304  {
305  $this->string = str_pad($this->string, $size, strval($char));
306  }
307 
308  return $this;
309  }
count()
Definition: String.php:856
substr($start, $length=null)
Returns part of a string.
Definition: String.php:204

◆ section()

section (   $separator,
  $first = 0,
  $last = 0 
)

Returns a section of the string.

Parameters
string$separator
integer$first
integer$last
Returns
TeamSpeak3_Helper_String
265  {
266  $sections = explode($separator, $this->string);
267 
268  $total = count($sections);
269  $first = intval($first);
270  $last = intval($last);
271 
272  if($first > $total) return null;
273  if($first > $last) $last = $first;
274 
275  for($i = 0; $i < $total; $i++)
276  {
277  if($i < $first || $i > $last)
278  {
279  unset($sections[$i]);
280  }
281  }
282 
283  $string = implode($separator, $sections);
284 
285  return new self($string);
286  }
count()
Definition: String.php:856

◆ spaceToPercent()

spaceToPercent ( )

Replaces space characters with percent encoded strings.

Returns
string
784  {
785  return str_replace(" ", "%20", $this->string);
786  }

◆ split()

split (   $separator,
  $limit = 0 
)

Splits the string into substrings wherever $separator occurs.

Parameters
string$separator
integer$limit
Returns
array
219  {
220  $parts = explode($separator, $this->string, ($limit) ? intval($limit) : $this->count());
221 
222  foreach($parts as $key => $val)
223  {
224  $parts[$key] = new self($val);
225  }
226 
227  return $parts;
228  }
count()
Definition: String.php:856

◆ startsWith()

startsWith (   $pattern)

Returns true if the string starts with $pattern.

Parameters
string$pattern
Returns
boolean
116  {
117  return (substr($this->string, 0, strlen($pattern)) == $pattern) ? TRUE : FALSE;
118  }
substr($start, $length=null)
Returns part of a string.
Definition: String.php:204

◆ substr()

substr (   $start,
  $length = null 
)

Returns part of a string.

Parameters
integer$start
integer$length
Returns
TeamSpeak3_Helper_String
205  {
206  $string = ($length !== null) ? substr($this->string, $start, $length) : substr($this->string, $start);
207 
208  return new self($string);
209  }
substr($start, $length=null)
Returns part of a string.
Definition: String.php:204

◆ toBase64()

toBase64 ( )

Encodes the string with MIME base64 and returns the result.

Returns
string
484  {
485  return base64_encode($this->string);
486  }

◆ toCrc32()

toCrc32 ( )

Calculates and returns the crc32 polynomial of the string.

Returns
string
418  {
419  return crc32($this->string);
420  }

◆ toHex()

toHex ( )

Returns the hexadecimal value of the string.

Returns
string
505  {
506  $hex = "";
507 
508  foreach($this as $char)
509  {
510  $hex .= $char->toHex();
511  }
512 
513  return $hex;
514  }

◆ toInt()

toInt ( )

Returns the integer value of the string.

Returns
float
integer
403  {
404  if($this->string == pow(2, 63) || $this->string == pow(2, 64))
405  {
406  return -1;
407  }
408 
409  return ($this->string > pow(2, 31)) ? floatval($this->string) : intval($this->string);
410  }

◆ toLower()

toLower ( )

Returns the lowercased string.

Returns
TeamSpeak3_Helper_String
159  {
160  return new self(strtolower($this->string));
161  }

◆ toMd5()

toMd5 ( )

Calculates and returns the md5 checksum of the string.

Returns
string
428  {
429  return md5($this->string);
430  }

◆ toSha1()

toSha1 ( )

Calculates and returns the sha1 checksum of the string.

Returns
string
438  {
439  return sha1($this->string);
440  }

◆ toString()

toString ( )

Returns the string as a standard string.

Returns
string
794  {
795  return $this->string;
796  }

◆ toUpper()

toUpper ( )

Returns the uppercased string.

Returns
TeamSpeak3_Helper_String
169  {
170  return new self(strtoupper($this->string));
171  }

◆ toUtf8()

toUtf8 ( )

Converts the string to UTF-8.

Returns
TeamSpeak3_Helper_String
469  {
470  if(!$this->isUtf8())
471  {
472  $this->string = utf8_encode($this->string);
473  }
474 
475  return $this;
476  }
isUtf8()
Returns TRUE if the string is UTF-8 encoded.
Definition: String.php:448

◆ transliterate()

transliterate ( )

Returns the string transliterated from UTF-8 to Latin.

Returns
TeamSpeak3_Helper_String
546  {
547  $utf8_accents = array(
548  "à" => "a",
549  "ô" => "o",
550  "ď" => "d",
551  "ḟ" => "f",
552  "ë" => "e",
553  "š" => "s",
554  "ơ" => "o",
555  "ß" => "ss",
556  "ă" => "a",
557  "ř" => "r",
558  "ț" => "t",
559  "ň" => "n",
560  "ā" => "a",
561  "ķ" => "k",
562  "ŝ" => "s",
563  "ỳ" => "y",
564  "ņ" => "n",
565  "ĺ" => "l",
566  "ħ" => "h",
567  "ṗ" => "p",
568  "ó" => "o",
569  "ú" => "u",
570  "ě" => "e",
571  "é" => "e",
572  "ç" => "c",
573  "ẁ" => "w",
574  "ċ" => "c",
575  "õ" => "o",
576  "ṡ" => "s",
577  "ø" => "o",
578  "ģ" => "g",
579  "ŧ" => "t",
580  "ș" => "s",
581  "ė" => "e",
582  "ĉ" => "c",
583  "ś" => "s",
584  "î" => "i",
585  "ű" => "u",
586  "ć" => "c",
587  "ę" => "e",
588  "ŵ" => "w",
589  "ṫ" => "t",
590  "ū" => "u",
591  "č" => "c",
592  "ö" => "oe",
593  "è" => "e",
594  "ŷ" => "y",
595  "ą" => "a",
596  "ł" => "l",
597  "ų" => "u",
598  "ů" => "u",
599  "ş" => "s",
600  "ğ" => "g",
601  "ļ" => "l",
602  "ƒ" => "f",
603  "ž" => "z",
604  "ẃ" => "w",
605  "ḃ" => "b",
606  "å" => "a",
607  "ì" => "i",
608  "ï" => "i",
609  "ḋ" => "d",
610  "ť" => "t",
611  "ŗ" => "r",
612  "ä" => "ae",
613  "í" => "i",
614  "ŕ" => "r",
615  "ê" => "e",
616  "ü" => "ue",
617  "ò" => "o",
618  "ē" => "e",
619  "ñ" => "n",
620  "ń" => "n",
621  "ĥ" => "h",
622  "ĝ" => "g",
623  "đ" => "d",
624  "ĵ" => "j",
625  "ÿ" => "y",
626  "ũ" => "u",
627  "ŭ" => "u",
628  "ư" => "u",
629  "ţ" => "t",
630  "ý" => "y",
631  "ő" => "o",
632  "â" => "a",
633  "ľ" => "l",
634  "ẅ" => "w",
635  "ż" => "z",
636  "ī" => "i",
637  "ã" => "a",
638  "ġ" => "g",
639  "ṁ" => "m",
640  "ō" => "o",
641  "ĩ" => "i",
642  "ù" => "u",
643  "į" => "i",
644  "ź" => "z",
645  "á" => "a",
646  "û" => "u",
647  "þ" => "th",
648  "ð" => "dh",
649  "æ" => "ae",
650  "µ" => "u",
651  "ĕ" => "e",
652  "œ" => "oe",
653  "À" => "A",
654  "Ô" => "O",
655  "Ď" => "D",
656  "Ḟ" => "F",
657  "Ë" => "E",
658  "Š" => "S",
659  "Ơ" => "O",
660  "Ă" => "A",
661  "Ř" => "R",
662  "Ț" => "T",
663  "Ň" => "N",
664  "Ā" => "A",
665  "Ķ" => "K",
666  "Ŝ" => "S",
667  "Ỳ" => "Y",
668  "Ņ" => "N",
669  "Ĺ" => "L",
670  "Ħ" => "H",
671  "Ṗ" => "P",
672  "Ó" => "O",
673  "Ú" => "U",
674  "Ě" => "E",
675  "É" => "E",
676  "Ç" => "C",
677  "Ẁ" => "W",
678  "Ċ" => "C",
679  "Õ" => "O",
680  "Ṡ" => "S",
681  "Ø" => "O",
682  "Ģ" => "G",
683  "Ŧ" => "T",
684  "Ș" => "S",
685  "Ė" => "E",
686  "Ĉ" => "C",
687  "Ś" => "S",
688  "Î" => "I",
689  "Ű" => "U",
690  "Ć" => "C",
691  "Ę" => "E",
692  "Ŵ" => "W",
693  "Ṫ" => "T",
694  "Ū" => "U",
695  "Č" => "C",
696  "Ö" => "Oe",
697  "È" => "E",
698  "Ŷ" => "Y",
699  "Ą" => "A",
700  "Ł" => "L",
701  "Ų" => "U",
702  "Ů" => "U",
703  "Ş" => "S",
704  "Ğ" => "G",
705  "Ļ" => "L",
706  "Ƒ" => "F",
707  "Ž" => "Z",
708  "Ẃ" => "W",
709  "Ḃ" => "B",
710  "Å" => "A",
711  "Ì" => "I",
712  "Ï" => "I",
713  "Ḋ" => "D",
714  "Ť" => "T",
715  "Ŗ" => "R",
716  "Ä" => "Ae",
717  "Í" => "I",
718  "Ŕ" => "R",
719  "Ê" => "E",
720  "Ü" => "Ue",
721  "Ò" => "O",
722  "Ē" => "E",
723  "Ñ" => "N",
724  "Ń" => "N",
725  "Ĥ" => "H",
726  "Ĝ" => "G",
727  "Đ" => "D",
728  "Ĵ" => "J",
729  "Ÿ" => "Y",
730  "Ũ" => "U",
731  "Ŭ" => "U",
732  "Ư" => "U",
733  "Ţ" => "T",
734  "Ý" => "Y",
735  "Ő" => "O",
736  "Â" => "A",
737  "Ľ" => "L",
738  "Ẅ" => "W",
739  "Ż" => "Z",
740  "Ī" => "I",
741  "Ã" => "A",
742  "Ġ" => "G",
743  "Ṁ" => "M",
744  "Ō" => "O",
745  "Ĩ" => "I",
746  "Ù" => "U",
747  "Į" => "I",
748  "Ź" => "Z",
749  "Á" => "A",
750  "Û" => "U",
751  "Þ" => "Th",
752  "Ð" => "Dh",
753  "Æ" => "Ae",
754  "Ĕ" => "E",
755  "Œ" => "Oe",
756  );
757 
758  return new self($this->toUtf8()->replace(array_keys($utf8_accents), array_values($utf8_accents)));
759  }
toUtf8()
Converts the string to UTF-8.
Definition: String.php:468

◆ trim()

trim ( )

Strips whitespaces (or other characters) from the beginning and end of the string.

Returns
TeamSpeak3_Helper_String
317  {
318  $this->string = trim($this->string);
319 
320  return $this;
321  }
trim()
Strips whitespaces (or other characters) from the beginning and end of the string.
Definition: String.php:316

◆ unescape()

unescape ( )

Unescapes a string using the TeamSpeak 3 escape patterns.

Returns
TeamSpeak3_Helper_String
344  {
345  $this->string = strtr($this->string, array_flip(TeamSpeak3::getEscapePatterns()));
346 
347  return $this;
348  }
static getEscapePatterns()
Returns an assoc array containing all escape patterns available on a TeamSpeak 3 Server.
Definition: TeamSpeak3.php:554

◆ uriSafe()

uriSafe (   $spacer = "-")

Processes the string and replaces all accented UTF-8 characters by unaccented ASCII-7 "equivalents", whitespaces are replaced by a pre-defined spacer and the string is lowercase.

Parameters
string$spacer
Returns
TeamSpeak3_Helper_String
769  {
770  $this->string = str_replace($spacer, " ", $this->string);
771  $this->string = $this->transliterate();
772  $this->string = preg_replace("/(\s|[^A-Za-z0-9\-])+/", $spacer, trim(strtolower($this->string)));
773  $this->string = trim($this->string, $spacer);
774 
775  return new self($this->string);
776  }
transliterate()
Returns the string transliterated from UTF-8 to Latin.
Definition: String.php:545
trim()
Strips whitespaces (or other characters) from the beginning and end of the string.
Definition: String.php:316

The documentation for this class was generated from the following file: