trim
description
This function returns a string with whitespace stripped from the beginning and end of $str. Without the second parameter, trim() 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.
- "\0" (ASCII 0 (0x00)), the NUL-byte.
- "\x0B" (ASCII 11 (0x0B)), a vertical tab.
Die Funktion entfernt Whitespaces an Anfang und Ende von $str und gibt den String dann zurück. Ohne Verwendung des zweiten Parameters entfernt trim() folgende Zeichen:
- " " (ASCII 32 (0x20)), ein normales Leerzeichen.
- "\t" (ASCII 9 (0x09)), ein Tabulatorzeichen.
- "\n" (ASCII 10 (0x0A)), einen Zeilenvorschub (Line Feed).
- "\r" (ASCII 13 (0x0D)), ein Wagenrücklaufzeichen (Carriage Return).
- "\0" (ASCII 0 (0x00)), das NUL-Byte.
- "\x0B" (ASCII 11 (0x0B)), ein vertikaler Tabulator.
La función devuelve una cadena con los espacios en blanco eliminados del principio y del final de la cadena indicada en el parámetro $str. Si no se emplea el segundo parámetro ($charlist), la función trim() elimina los siguientes caracteres:
- " " (ASCII 32 (0x20)), un espacio en blanco.
- "\t" (ASCII 9 (0x09)), un tabulador.
- "\n" (ASCII 10 (0x0A)), una nueva linea.
- "\r" (ASCII 13 (0x0D)), un retorno de carro.
- "\0" (ASCII 0 (0x00)), el byte NUL.
- "\x0B" (ASCII 11 (0x0B)), un tabulador vertical.
trim() retourne la chaîne $str, après avoir supprimé les caractères invisibles en début et fin de chaîne. Si le second paramètre $charlist est omis, trim() supprimera les caractères suivants :
- " " (ASCII 32 (0x20)), un espace ordinaire.
- "\t" (ASCII 9 (0x09)), une tabulation.
- "\n" (ASCII 10 (0x0A)), une nouvelle ligne (line feed).
- "\r" (ASCII 13 (0x0D)), un retour chariot (carriage return).
- "\0" (ASCII 0 (0x00)), le caractère NUL.
- "\x0B" (ASCII 11 (0x0B)), une tabulation verticale.
Esta função retorna uma string com os espaçoes retirados do ínicio e do final de $str. Sem o segundo parâmetro, trim() irá retirar estes caracteres:
- " " (ASCII 32 (0x20)), um espaço normal.
- "\t" (ASCII 9 (0x09)), uma tabulação.
- "\n" (ASCII 10 (0x0A)), uma linha nova (line feed).
- "\r" (ASCII 13 (0x0D)), um retono de carro.
- "\0" (ASCII 0 (0x00)), o byte NULL.
- "\x0B" (ASCII 11 (0x0B)), uma tabulação vertical.
function call
string trim( string $str [, string $charlist ] )
test trim online
comments for trim
be the first
No comments so far for trim. Leave your's as first below.
