GNU Info

Info Node: (librep.info)String Functions

(librep.info)String Functions


Next: Sleeping Prev: Environment Variables Up: The language
Enter node , (file) or (file)node

String Functions
================

 - Function: translate-string string map
     Applies the MAP to each character in the STRING. MAP is also
     string, each character represents the translation for an ASCII
     character of that characters position in the string. If the string
     is less than 256 chars long any undefined characters will remain
     unchanged.

     For example, if STRING contains the character `A', with ASCII code
     65, then it would be replaced by the 65th character in the string
     MAP.

     Note that the STRING really is modified, no copy is made

 - Variable: upcase-table
     A `translate-string' compatible translation map to convert
     lowercase characters to uppercase characters.

 - Variable: downcase-table
     A map to convert uppercase characters to lowercase.

 - Variable: flatten-table
     A translation map to convert newline characters to spaces.

     (translate-string "Foo" upcase-table)
         => "FOO"
     
     (translate-string "Foo" downcase-table)
         => "foo"

 - Function: complete-string template list #!optional ignore-case
     Return a string whose beginning matches the string TEMPLATE, and
     is unique in the set of all strings in LIST which also match
     TEMPLATE. If IGNORE-CASE is true, all matching ignores case of
     characters.

          (complete-string "foo" '("bar" "foobar" "forbarf" "foobat"))
              => "fooba"

 - Function: string-head-eq string-1 string-2
     Returns t if STRING-2 matches the beginning of STRING-1.

          (string-head-eq "foobar" "foo")
              => t
          
          (string-head-eq "foo" "foobar")
              => ()

 - Function: string-upper-case-p string
     Return true if STRING contains no lower case characters.

 - Function: string-lower-case-p string
     Return true if STRING contains no upper case characters.

 - Function: string-capitalized-p string
     Return true if the first character of STRING is upper case.

 - Function: string-upcase string
     Return a new string, an upper case copy of STRING.

 - Function: string-downcase string
     Return a new string, a lower case copy of STRING.

 - Function: capitalize-string string
     Return a new string, a copy of STRING with the first character in
     upper case.

 - Function: mapconcat function sequence separator
     Call FUNCTION for each member of SEQUENCE, concatenating the
     results. Between each pair of results, insert SEPARATOR.  Return
     the resulting string.


automatically generated by info2www version 1.2.2.9