March 2019
Intermediate to advanced
242 pages
6h 21m
English
The indent(int) method will enable developers to specify custom indentations for their multiline string values. You can pass a positive number, i, to indent(int), to add i spaces (U+0020) to your text, or you can pass a negative number, to remove a given number of whitespaces from each line of your multiline text.
An example is as follows:
String comment =
`one
of
my
favorite
lang
feature
from Amber(!)
`.align().indent(15);
System.out.println(comment);
The output of the preceding code is as follows:
one
of
my
favorite
lang
feature
from Amber(!)
Read now
Unlock full access