Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- FUNCky - <b>name:</b> <b>untrim() - pad a string with spaces</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
  Name:     untrim() - pad a string with spaces
  Usage:    <string> = untrim(<string>,<len>)
  Params:   string <string> - the string to pad
            integer <len> - the number of spaces to add to <string>,
            if <num> is less than the length of <string>, then
            <string> is truncated at <len> characters.

  Returns:  a string equal to <string> with trailing spaces added
            to fill it out to <len> length, or truncated to equal
            <len> length.

 ---------------------------------- Example ---------------------------------

                 ? untrim("string one",20)
                 ? untrim("char 1",20)

                 * prints "string one         "
                 *        "char 1             "

                 ? untrim("string one",4)
                 * prints "stri"

  Note:     Untrim() is equivalent to the pad() function found in
            the file examplep.prg, it is however much faster.


See Also: trimpunct() strexpand() center() rjust() ljust()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson