@@ -1325,8 +1325,8 @@ final class StringOps(private val s: String) extends AnyVal {
1325
1325
* ''n'' times in `that`, then the first ''n'' occurrences of `x` will not form
1326
1326
* part of the result, but any following occurrences will.
1327
1327
*/
1328
- @ deprecated(" Use `new WrappedString(s).diff(...).self ` instead of `s.diff(...)`" , " 2.13.0" )
1329
- def diff (that : Seq [_ >: Char ]): String = new WrappedString (s).diff(that).self
1328
+ @ deprecated(" Use `new WrappedString(s).diff(...).unwrap ` instead of `s.diff(...)`" , " 2.13.0" )
1329
+ def diff (that : Seq [_ >: Char ]): String = new WrappedString (s).diff(that).unwrap
1330
1330
1331
1331
/** Computes the multiset intersection between this string and another sequence.
1332
1332
*
@@ -1337,12 +1337,12 @@ final class StringOps(private val s: String) extends AnyVal {
1337
1337
* ''n'' times in `that`, then the first ''n'' occurrences of `x` will be retained
1338
1338
* in the result, but any following occurrences will be omitted.
1339
1339
*/
1340
- @ deprecated(" Use `new WrappedString(s).intersect(...).self ` instead of `s.intersect(...)`" , " 2.13.0" )
1341
- def intersect (that : Seq [_ >: Char ]): String = new WrappedString (s).intersect(that).self
1340
+ @ deprecated(" Use `new WrappedString(s).intersect(...).unwrap ` instead of `s.intersect(...)`" , " 2.13.0" )
1341
+ def intersect (that : Seq [_ >: Char ]): String = new WrappedString (s).intersect(that).unwrap
1342
1342
1343
1343
/** Selects all distinct chars of this string ignoring the duplicates. */
1344
- @ deprecated(" Use `new WrappedString(s).distinct.self ` instead of `s.distinct`" , " 2.13.0" )
1345
- def distinct : String = new WrappedString (s).distinct.self
1344
+ @ deprecated(" Use `new WrappedString(s).distinct.unwrap ` instead of `s.distinct`" , " 2.13.0" )
1345
+ def distinct : String = new WrappedString (s).distinct.unwrap
1346
1346
1347
1347
/** Selects all distinct chars of this string ignoring the duplicates as determined by `==` after applying
1348
1348
* the transforming function `f`.
@@ -1351,8 +1351,8 @@ final class StringOps(private val s: String) extends AnyVal {
1351
1351
* @tparam B the type of the elements after being transformed by `f`
1352
1352
* @return a new string consisting of all the chars of this string without duplicates.
1353
1353
*/
1354
- @ deprecated(" Use `new WrappedString(s).distinctBy(...).self ` instead of `s.distinctBy(...)`" , " 2.13.0" )
1355
- def distinctBy [B ](f : Char => B ): String = new WrappedString (s).distinctBy(f).self
1354
+ @ deprecated(" Use `new WrappedString(s).distinctBy(...).unwrap ` instead of `s.distinctBy(...)`" , " 2.13.0" )
1355
+ def distinctBy [B ](f : Char => B ): String = new WrappedString (s).distinctBy(f).unwrap
1356
1356
1357
1357
/** Sorts the characters of this string according to an Ordering.
1358
1358
*
@@ -1365,8 +1365,8 @@ final class StringOps(private val s: String) extends AnyVal {
1365
1365
* @return a string consisting of the chars of this string
1366
1366
* sorted according to the ordering `ord`.
1367
1367
*/
1368
- @ deprecated(" Use `new WrappedString(s).sorted.self ` instead of `s.sorted`" , " 2.13.0" )
1369
- def sorted [B >: Char ](implicit ord : Ordering [B ]): String = new WrappedString (s).sorted(ord).self
1368
+ @ deprecated(" Use `new WrappedString(s).sorted.unwrap ` instead of `s.sorted`" , " 2.13.0" )
1369
+ def sorted [B >: Char ](implicit ord : Ordering [B ]): String = new WrappedString (s).sorted(ord).unwrap
1370
1370
1371
1371
/** Sorts this string according to a comparison function.
1372
1372
*
@@ -1379,8 +1379,8 @@ final class StringOps(private val s: String) extends AnyVal {
1379
1379
* @return a string consisting of the elements of this string
1380
1380
* sorted according to the comparison function `lt`.
1381
1381
*/
1382
- @ deprecated(" Use `new WrappedString(s).sortWith(...).self ` instead of `s.sortWith(...)`" , " 2.13.0" )
1383
- def sortWith (lt : (Char , Char ) => Boolean ): String = new WrappedString (s).sortWith(lt).self
1382
+ @ deprecated(" Use `new WrappedString(s).sortWith(...).unwrap ` instead of `s.sortWith(...)`" , " 2.13.0" )
1383
+ def sortWith (lt : (Char , Char ) => Boolean ): String = new WrappedString (s).sortWith(lt).unwrap
1384
1384
1385
1385
/** Sorts this string according to the Ordering which results from transforming
1386
1386
* an implicitly given Ordering with a transformation function.
@@ -1398,8 +1398,8 @@ final class StringOps(private val s: String) extends AnyVal {
1398
1398
* sorted according to the ordering where `x < y` if
1399
1399
* `ord.lt(f(x), f(y))`.
1400
1400
*/
1401
- @ deprecated(" Use `new WrappedString(s).sortBy(...).self ` instead of `s.sortBy(...)`" , " 2.13.0" )
1402
- def sortBy [B ](f : Char => B )(implicit ord : Ordering [B ]): String = new WrappedString (s).sortBy(f)(ord).self
1401
+ @ deprecated(" Use `new WrappedString(s).sortBy(...).unwrap ` instead of `s.sortBy(...)`" , " 2.13.0" )
1402
+ def sortBy [B ](f : Char => B )(implicit ord : Ordering [B ]): String = new WrappedString (s).sortBy(f)(ord).unwrap
1403
1403
1404
1404
/** Partitions this string into a map of strings according to some discriminator function.
1405
1405
*
@@ -1413,8 +1413,8 @@ final class StringOps(private val s: String) extends AnyVal {
1413
1413
* for which `f(x)` equals `k`.
1414
1414
*
1415
1415
*/
1416
- @ deprecated(" Use `new WrappedString(s).groupBy(...).view.mapValues(_.self )` instead of `s.groupBy(...)`" , " 2.13.0" )
1417
- def groupBy [K ](f : Char => K ): immutable.Map [K , String ] = new WrappedString (s).groupBy(f).view.mapValues(_.self ).toMap
1416
+ @ deprecated(" Use `new WrappedString(s).groupBy(...).view.mapValues(_.unwrap )` instead of `s.groupBy(...)`" , " 2.13.0" )
1417
+ def groupBy [K ](f : Char => K ): immutable.Map [K , String ] = new WrappedString (s).groupBy(f).view.mapValues(_.unwrap ).toMap
1418
1418
1419
1419
/** Groups chars in fixed size blocks by passing a "sliding window"
1420
1420
* over them (as opposed to partitioning them, as is done in grouped.)
@@ -1426,8 +1426,8 @@ final class StringOps(private val s: String) extends AnyVal {
1426
1426
* last element (which may be the only element) will be truncated
1427
1427
* if there are fewer than `size` chars remaining to be grouped.
1428
1428
*/
1429
- @ deprecated(" Use `new WrappedString(s).sliding(...).map(_.self )` instead of `s.sliding(...)`" , " 2.13.0" )
1430
- def sliding (size : Int , step : Int = 1 ): Iterator [String ] = new WrappedString (s).sliding(size, step).map(_.self )
1429
+ @ deprecated(" Use `new WrappedString(s).sliding(...).map(_.unwrap )` instead of `s.sliding(...)`" , " 2.13.0" )
1430
+ def sliding (size : Int , step : Int = 1 ): Iterator [String ] = new WrappedString (s).sliding(size, step).map(_.unwrap )
1431
1431
1432
1432
/** Iterates over combinations. A _combination_ of length `n` is a subsequence of
1433
1433
* the original string, with the chars taken in order. Thus, `"xy"` and `"yy"`
@@ -1442,16 +1442,16 @@ final class StringOps(private val s: String) extends AnyVal {
1442
1442
* @return An Iterator which traverses the possible n-element combinations of this string.
1443
1443
* @example `"abbbc".combinations(2) = Iterator(ab, ac, bb, bc)`
1444
1444
*/
1445
- @ deprecated(" Use `new WrappedString(s).combinations(...).map(_.self )` instead of `s.combinations(...)`" , " 2.13.0" )
1446
- def combinations (n : Int ): Iterator [String ] = new WrappedString (s).combinations(n).map(_.self )
1445
+ @ deprecated(" Use `new WrappedString(s).combinations(...).map(_.unwrap )` instead of `s.combinations(...)`" , " 2.13.0" )
1446
+ def combinations (n : Int ): Iterator [String ] = new WrappedString (s).combinations(n).map(_.unwrap )
1447
1447
1448
1448
/** Iterates over distinct permutations.
1449
1449
*
1450
1450
* @return An Iterator which traverses the distinct permutations of this string.
1451
1451
* @example `"abb".permutations = Iterator(abb, bab, bba)`
1452
1452
*/
1453
- @ deprecated(" Use `new WrappedString(s).permutations(...).map(_.self )` instead of `s.permutations(...)`" , " 2.13.0" )
1454
- def permutations : Iterator [String ] = new WrappedString (s).permutations.map(_.self )
1453
+ @ deprecated(" Use `new WrappedString(s).permutations(...).map(_.unwrap )` instead of `s.permutations(...)`" , " 2.13.0" )
1454
+ def permutations : Iterator [String ] = new WrappedString (s).permutations.map(_.unwrap )
1455
1455
}
1456
1456
1457
1457
case class StringView (s : String ) extends AbstractIndexedSeqView [Char ] {
0 commit comments