Navigation
Synopsis Left alignment of string in given space.
Function
  1. str left(str s, int n)
  2. str left(str s, int n, str pad)
Usage import String;
Description
  1. Left align string s in string of length n using spaces.
  2. Left align string s in string of length n using pad as pad character.
Examples
rascal>import String;
ok
rascal>left("abc", 10);
str: "abc       "
rascal>left("abc", 10, "x");
str: "abcxxxxxxx"
Is this page unclear, or have you spotted an error? Please add a comment below and help us to improve it. For all other questions and remarks, visit ask.rascal-mpl.org.