Mark CharSequence.iterator() with operator.

This commit is contained in:
Ilya Gorbunov
2015-09-28 21:50:54 +03:00
parent e92a95eebb
commit a55f9feacb
+1 -1
View File
@@ -189,7 +189,7 @@ public fun String?.isNullOrBlank(): Boolean = this == null || this.isBlank()
/** /**
* Iterator for characters of given CharSequence. * Iterator for characters of given CharSequence.
*/ */
public fun CharSequence.iterator(): CharIterator = object : CharIterator() { public operator fun CharSequence.iterator(): CharIterator = object : CharIterator() {
private var index = 0 private var index = 0
public override fun nextChar(): Char = get(index++) public override fun nextChar(): Char = get(index++)