Navigation

Operators and Keywords

Function List:

C++ API

Function File: strjust (s)
Function File: strjust (s, pos)

Return the text, s, justified according to pos, which may be "left", "center", or "right".

If pos is omitted it defaults to "right".

Null characters are replaced by spaces. All other character data are treated as non-white space.

Example:

strjust (["a"; "ab"; "abc"; "abcd"])
     ⇒
        "   a"
        "  ab"
        " abc"
        "abcd"

See also: deblank, strrep, strtrim, untabify.

Package: octave