Clarify Starlark docs for string.strip(), string.lstrip(), and string.rstrip().
RELNOTES: None.
@@ -178,7 +178,8 @@ public final class StringModule {
name = "lstrip",
doc =
"Returns a copy of the string where leading characters that appear in "
- + "<code>chars</code> are removed."
+ + "<code>chars</code> are removed. Note that <code>chars</code> "
+ + "is not a prefix: all combinations of its value are removed:"
+ "<pre class=\"language-python\">"
+ "\"abcba\".lstrip(\"ba\") == \"cba\""
+ "</pre>",
@@ -202,7 +203,8 @@ public final class StringModule {
name = "rstrip",
doc =
"Returns a copy of the string where trailing characters that appear in "
- + "<code>chars</code> are removed."
+ + "<code>chars</code> are removed. Note that <code>chars</code> "
+ + "is not a suffix: all combinations of its value are removed:"
+ "<pre class=\"language-python\">"
+ "\"abcbaa\".rstrip(\"ab\") == \"abc\""
+ "</pre>",
@@ -226,7 +228,9 @@ public final class StringModule {
name = "strip",
doc =
"Returns a copy of the string where leading or trailing characters that appear in "
- + "<code>chars</code> are removed."
+ + "<code>chars</code> are removed. Note that <code>chars</code> "
+ + "is neither a prefix nor a suffix: all combinations of its value "
+ + "are removed:"
+ "<pre class=\"language-python\">"
+ "\"aabcbcbaa\".strip(\"ab\") == \"cbc\""
+ "</pre>",
