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

Side by Side Diff: sdk/lib/core/string.dart

Issue 15263004: Adding isNotEmpty property to collection and string. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fix template generation Created 7 years, 6 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « sdk/lib/core/map.dart ('k') | sdk/lib/core/string_buffer.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 part of dart.core; 5 part of dart.core;
6 6
7 /** 7 /**
8 * The String class represents sequences of characters. Strings are 8 * The String class represents sequences of characters. Strings are
9 * immutable. A string is represented by a sequence of Unicode UTF-16 9 * immutable. A string is represented by a sequence of Unicode UTF-16
10 * code units accessible through the [codeUnitAt] or the 10 * code units accessible through the [codeUnitAt] or the
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 * Returns -1 if [other] could not be found. 122 * Returns -1 if [other] could not be found.
123 */ 123 */
124 int lastIndexOf(String other, [int start]); 124 int lastIndexOf(String other, [int start]);
125 125
126 /** 126 /**
127 * Returns whether this string is empty. 127 * Returns whether this string is empty.
128 */ 128 */
129 bool get isEmpty; 129 bool get isEmpty;
130 130
131 /** 131 /**
132 * Returns whether this string is not empty.
133 */
134 bool get isNotEmpty;
135
136 /**
132 * Creates a new string by concatenating this string with [other]. 137 * Creates a new string by concatenating this string with [other].
133 * 138 *
134 * A sequence of strings can be concatenated by using [Iterable.join]: 139 * A sequence of strings can be concatenated by using [Iterable.join]:
135 * 140 *
136 * var strings = ['foo', 'bar', 'geez']; 141 * var strings = ['foo', 'bar', 'geez'];
137 * var concatenated = strings.join(); 142 * var concatenated = strings.join();
138 */ 143 */
139 String operator +(String other); 144 String operator +(String other);
140 145
141 /** 146 /**
(...skipping 315 matching lines...) Expand 10 before | Expand all | Expand 10 after
457 _position = position - 1; 462 _position = position - 1;
458 _currentCodePoint = _combineSurrogatePair(prevCodeUnit, codeUnit); 463 _currentCodePoint = _combineSurrogatePair(prevCodeUnit, codeUnit);
459 return true; 464 return true;
460 } 465 }
461 } 466 }
462 _position = position; 467 _position = position;
463 _currentCodePoint = codeUnit; 468 _currentCodePoint = codeUnit;
464 return true; 469 return true;
465 } 470 }
466 } 471 }
OLDNEW
« no previous file with comments | « sdk/lib/core/map.dart ('k') | sdk/lib/core/string_buffer.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698