Current Location: Home> Function Categories> ltrim

ltrim

Remove spaces (or other characters) from the beginning of the string
Name:ltrim
Category:String
Programming Language:php
One-line Description:Removes whitespace or other characters to the left of the string.

Definition and usage

ltrim() function removes whitespace characters or other predefined characters to the left of the string.

Related functions:

  • rtrim() - Removes whitespace or other predefined characters to the right of the string
  • trim() - Remove whitespace or other predefined characters on both sides of the string

grammar

 ltrim ( string , charlist )
parameter describe
string Required. Specifies the string to be checked.
charlist

Optional. Specifies which characters to delete from the string. If this parameter is omitted, all the following characters are removed:

  • "\0" - NULL
  • "\t" - Tab
  • "\n" - Line break
  • "\x0B" - Vertical tab character
  • "\r" - Enter
  • " " - Spaces
Similar Functions
  • Convert a character from one Cyrillic character to another convert_cyr_string

    convert_cyr_string

    Convertacharacterfro
  • Use another string to fill a string to a length str_pad

    str_pad

    Useanotherstringtofi
  • Returns the formatted string sprintf

    sprintf

    Returnstheformatteds
  • Generate single-byte strings from numbers chr

    chr

    Generatesingle-bytes
  • Calculate the md5 hash value of a string md5

    md5

    Calculatethemd5hashv
  • Output formatted string printf

    printf

    Outputformattedstrin
  • Get the string length strlen

    strlen

    Getthestringlength
  • Substring replacement str_replace

    str_replace

    Substringreplacement
Popular Articles