Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(38)

Unified Diff: sdk/lib/core/string.dart

Issue 190853009: Add string.trimLeft/trimRight. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Remove left-over debugging aid. Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « sdk/lib/_internal/lib/js_string.dart ('k') | tests/corelib/corelib.status » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/core/string.dart
diff --git a/sdk/lib/core/string.dart b/sdk/lib/core/string.dart
index fce12492a1e44477ffd914a30119e9368fedbb73..5488a2ff6430d6c75a34ec03b3d8b29641791885 100644
--- a/sdk/lib/core/string.dart
+++ b/sdk/lib/core/string.dart
@@ -290,7 +290,7 @@ abstract class String implements Comparable<String>, Pattern {
String substring(int startIndex, [int endIndex]);
/**
- * Removes leading and trailing whitespace from a string.
+ * Returns the string without any leading and trailing whitespace.
*
* If the string contains leading or trailing whitespace, a new string with no
* leading and no trailing whitespace is returned:
@@ -326,6 +326,20 @@ abstract class String implements Comparable<String>, Pattern {
String trim();
/**
+ * Returns the string without any leading whitespace.
+ *
+ * As [trim], but only removes leading whitespace.
+ */
+ String trimLeft();
+
+ /**
+ * Returns the string without any trailing whitespace.
+ *
+ * As [trim], but only removes trailing whitespace.
+ */
+ String trimRight();
+
+ /**
* Creates a new string by concatenating this string with itself a number
* of times.
*
« no previous file with comments | « sdk/lib/_internal/lib/js_string.dart ('k') | tests/corelib/corelib.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698