Start Info Community Spielen
 
 

Morgengrauner Dokumentation

Dateipfad: /home/mud/mudlib/doc/efun/trim

SYNOPSIS
        #include 

        string trim(string s)
        string trim(string s, int where)
        string trim(string s, int where, int ch)
        string trim(string s, int where, string ch)

DESCRIPTION
        Remove all leading and trailing characters  from the string
         and return the new string.

         may be given as a single character, or a string of characters.
        If  is not given, it defaults to the whitespace " \t".

         can be used to modify where the characters are removed:

          TRIM_LEFT  (1):      remove the leading characters
          TRIM_RIGHT (2):      remove the trailing characters
          TRIM_BOTH  (3 or 0): remove both leading and trailing characters

EXAMPLES
        trim("   1234   ")                  --> "1234"
        trim("   1234   ", TRIM_RIGHT)      --> "   1234"
        trim("   1234   ", TRIM_BOTH, " 1") --> "234"

HISTORY
        Introduced in LDMud 3.2.7.

SEE ALSO
        regreplace(E)


zurück zur Übersicht

YOUTUBE | FACEBOOK | TWITTER | DISCORD | FEEDBACK | IMPRESSUM | DATENSCHUTZ 1992–2025 © MorgenGrauen.