Igor Yakovlev
35340f2f04
[Wasm] Fix stdlib String to Float parse
2022-12-29 11:57:47 +00:00
Abduqodiri Qurbonzoda
0db9326105
Introduce a deprecated StringBuilder.append(CharArray, Int, Int) in Common #KT-52336
2022-09-08 14:34:38 +00:00
Abduqodiri Qurbonzoda
6c4777dcdd
Fix JDK-dependent stdlib tests after advancing jvmTarget
2022-08-17 22:55:43 +03:00
Abduqodiri Qurbonzoda
33fb49f20d
Fix JDK7 failing tests
2022-04-06 07:42:58 +00:00
Abduqodiri Qurbonzoda
1cb5cab28f
[K/N and WASM] Fix ESCAPE and COMMENTS modes
2022-04-05 15:21:31 +00:00
Abduqodiri Qurbonzoda
9593069cb3
[K/N and WASM] Throw on duplicate group name
2022-04-05 15:21:30 +00:00
Abduqodiri Qurbonzoda
187faa121e
Test backreference to group with index zero
2022-04-05 15:21:29 +00:00
Abduqodiri Qurbonzoda
74121b26c0
Test octal literal in regex
2022-04-05 15:21:28 +00:00
Abduqodiri Qurbonzoda
46408ffd9d
Fix tests by adjusting to platform behavior
2022-04-05 15:21:27 +00:00
Abduqodiri Qurbonzoda
9c4c1ed557
[K/N and WASM] Implement named capturing group in Regexes #KT-41890
2022-04-05 15:21:26 +00:00
Abduqodiri Qurbonzoda
c3f5d03b36
[JS] Support named capture groups in Regex #KT-51775
2022-04-05 15:21:25 +00:00
Ilya Gorbunov
000165b12b
Fix incorrect conversion of Long to String in base 36 in JS KT-48924
2022-03-30 06:13:51 +00:00
Ilya Gorbunov
a829a6743d
KT-50173 Fix Regex.escapeReplacement function in JS
2021-12-12 00:27:31 +00:00
Pavel Kunyavskiy
9b366af38b
[K/N] Fix String.compareTo on unicode strings
...
^KT-49873
2021-12-01 07:51:27 +00:00
Ilya Gorbunov
4386a800c8
KT-49721 Avoid matching from the same position after a zero-width match
...
In JS, RegExp can return a match before the specified start index,
if it has matched at that index, but it is in the middle of a surrogate
pair. Account for that when advancing to the next position after
a zero-width match so that it doesn't get to the middle of SP.
2021-11-29 17:02:06 +00:00
Sergey Bogolepov
f43b5d32f9
Add tests for Char.isHighSurrogate() and Char.isLowSurrogate()
2021-11-09 08:27:59 +00:00
Svyatoslav Kuzmich
5b10396f48
[stdlib] Test that modification of the array returned by toCharArray() doesn't affect the original string
2021-10-28 15:49:00 +00:00
Svyatoslav Kuzmich
6ad6bca503
[Stdlib] Fix K/N StringBuilder insertRange capacity issue
2021-10-01 17:18:48 +03:00
Abduqodiri Qurbonzoda
dc2f5eab25
Align JS and JVM behavior of Regex replace function #KT-28378
2021-09-30 17:38:03 +00:00
Abduqodiri Qurbonzoda
f8bcba0b76
Align JS String.equals/compareTo(ignoreCase) behavior with JVM #KT-48999
2021-09-30 15:35:50 +00:00
Abduqodiri Qurbonzoda
b65c477e68
Regex.splitToSequence, CharSequence.splitToSequence(Regex) #KT-23351
2021-07-20 14:09:24 +00:00
Ilya Gorbunov
455fee29e4
Find correct next match after matchAt and matchEntire KT-47676
2021-07-10 21:31:20 +03:00
Ilya Gorbunov
28a0698463
Regex.matchAt/matchesAt #KT-34021
2021-07-10 21:31:19 +03:00
Abduqodiri Qurbonzoda
d934c97bf5
Equivalize isLowerCase and isUpperCase behavior in all platforms #KT-46184
2021-05-31 13:42:46 +03:00
Abduqodiri Qurbonzoda
54994a289f
Support all digit chars on JS and Native #KT-46002
2021-05-27 06:56:52 +03:00
Abduqodiri Qurbonzoda
aa543c6631
Migrate stdlib, tests and samples to new case conversion api
2021-04-08 03:22:01 +03:00
Ilya Gorbunov
b64b96eee6
Deprecate Char-to-Number conversions in stdlib (JVM and JS)
...
- Int.toChar was left non-deprecated because the replacement is not intrinsic yet.
- Number.toChar was left non-deprecated because otherwise the deprecation propagates to the override, Int.toChar.
KT-23451
2021-04-07 18:30:20 +03:00
Ilya Gorbunov
22ca412dd2
Fix case-insensitive character-wise comparison KT-45496
...
- Step 1: add failing tests
- Step 2: fix common case insensitive Char.equals
- Step 3: fix case insensitive String.equals in K/JS
- Step 4: enable unicode case folding in K/JS Regexes and
string replacement (KT-45928)
- Step 5: fix case insensitive char comparison in K/N in String functions
String.replace, equals, compareTo with ignoreCase
2021-04-07 14:43:41 +03:00
Abduqodiri Qurbonzoda
d28d0a6321
Advance String(CharArray) deprecation level to ERROR in Common and JS
2021-04-07 00:23:29 +03:00
Abduqodiri Qurbonzoda
ed57bcb3b1
Commonize and generalize JVM-only String.contentEquals #KT-42840
2021-03-06 11:14:30 +03:00
Abduqodiri Qurbonzoda
0c9205423f
Add String case conversion tests
2021-03-02 01:11:42 +03:00
Abduqodiri Qurbonzoda
49ce776bf4
Add Char case conversion tests
2021-03-02 01:11:39 +03:00
Abduqodiri Qurbonzoda
46b7a774b5
Commonize CharCategory and related functions #KT-39177 #KT-43216 #KT-39906 #KT-30652
2021-01-28 01:41:24 +03:00
Abduqodiri Qurbonzoda
662787b12b
Straighten Char-to-code and Char-to-digit conversions out #KT-23451
2020-12-31 12:07:41 +03:00
Abduqodiri Qurbonzoda
1314adb6f7
Locale-agnostic case conversions by default #KT-43023
2020-12-30 10:08:25 +03:00
Svyatoslav Scherbina
0f4173cdfa
Fix running stdlib tests in worker on Native
...
Add `@SharedImmutable` or `@ThreadLocal` where required.
2020-12-14 19:03:06 +03:00
Ilya Gorbunov
149bcc2d22
Revert using regex Pattern in String.replace
...
Use String.indexOf(..., ignoreCase) instead in all branches to preserve
compatibility with behavior before 1.4.20 that used String.split which
essentially relied on that String.indexOf
#KT-43745 Fixed
2020-12-04 17:43:54 +03:00
Ilya Gorbunov
fafb4a7914
Use regex for case-insensitive String.replace
...
KT-41799
2020-10-02 00:29:26 +03:00
Ilya Gorbunov
349cad7b9a
Minor: migrate remaining scanReduceIndexed usages
2020-09-11 19:08:04 +03:00
Ilya Gorbunov
20683d62a6
Postpone introducing common StringBuilder.capacity() function
...
Its support complicates JS StringBuilder implementation with no actual
performance improvements. Benefits of having capacity() function
in common code are also not completely clear.
Relates to KT-33069
#KT-40168
2020-07-10 18:49:39 +03:00
Ilya Gorbunov
130987fa1e
Provide flatMapIndexed operation
...
- similar to flatMap, but transform function takes index and element
#KT-36894
2020-06-19 17:55:15 +03:00
Abduqodiri Qurbonzoda
846a7823ad
Introduce minOrNull and maxOrNull extension functions #KT-39064
2020-06-19 04:53:49 +03:00
Abduqodiri Qurbonzoda
6a2fed33d3
Deprecate old CharArray to String conversion api #KT-31343
2020-06-08 04:12:28 +03:00
Abduqodiri Qurbonzoda
1bd63bb07f
Make consistent parameter nullability with appendLine
2020-06-01 22:00:36 +03:00
Abduqodiri Qurbonzoda
e05eeea6cd
Promote common StringBuilder to stable
2020-06-01 22:00:34 +03:00
Abduqodiri Qurbonzoda
57597f5900
Fix String.toHashSet tests
2020-04-20 04:08:29 +03:00
Abduqodiri Qurbonzoda
0d5ec27ac4
toHashSet is suboptimal for inputs with a lot of duplicates #KT-23142
2020-04-19 07:58:49 +03:00
Ilya Gorbunov
893021f22b
Introduce runningFold and runningReduce operations
...
runningFold is a synonym for scan,
runningReduce replaces scanReduce.
#KT-38060
2020-04-15 23:28:07 +03:00
Abduqodiri Qurbonzoda
08ff52bee4
Introduce StringBuilder.appendLine in stdlib-common #KT-37839
2020-04-13 14:27:53 +03:00
Abduqodiri Qurbonzoda
4a7b1b210a
Add onEachIndexed similar to forEachIndexed #KT-37161
2020-04-11 03:47:47 +03:00