summaryrefslogtreecommitdiff
path: root/doc/classes
diff options
context:
space:
mode:
Diffstat (limited to 'doc/classes')
-rw-r--r--doc/classes/String.xml11
1 files changed, 10 insertions, 1 deletions
diff --git a/doc/classes/String.xml b/doc/classes/String.xml
index ce902c1216..cd6fc10931 100644
--- a/doc/classes/String.xml
+++ b/doc/classes/String.xml
@@ -124,7 +124,7 @@
<method name="dedent" qualifiers="const">
<return type="String" />
<description>
- Returns a copy of the string with indentation (leading tabs and spaces) removed.
+ Returns a copy of the string with indentation (leading tabs and spaces) removed. See also [method indent] to add indentation.
</description>
</method>
<method name="ends_with" qualifiers="const">
@@ -243,6 +243,15 @@
<description>
</description>
</method>
+ <method name="indent" qualifiers="const">
+ <return type="String" />
+ <argument index="0" name="prefix" type="String" />
+ <description>
+ Returns a copy of the string with lines indented with [code]prefix[/code].
+ For example, the string can be indented with two tabs using [code]"\t\t"[/code], or four spaces using [code]" "[/code]. The prefix can be any string so it can also be used to comment out strings with e.g. [code]"# "[/code]. See also [method dedent] to remove indentation.
+ [b]Note:[/b] Empty lines are kept empty.
+ </description>
+ </method>
<method name="insert" qualifiers="const">
<return type="String" />
<argument index="0" name="position" type="int" />