Abduqodiri Qurbonzoda
df16fa3306
[K/N] Regex matching zero length should split surrogate pairs #KT-57401
...
Merge-request: KT-MR-11110
Merged-by: Abduqodiri Qurbonzoda <abduqodiri.qurbonzoda@jetbrains.com >
2023-07-26 14:19:25 +00:00
Abduqodiri Qurbonzoda
4ae19b2b44
[K/N] Deprecate SharedImmutable annotation #KT-57837
...
As a part of efforts to stabilize Native stdlib.
2023-06-19 11:35:32 +00:00
Abduqodiri Qurbonzoda
ae394caf42
[K/N] Throw OutOfMemoryError when StringBuilder overflows
2023-06-06 18:11:57 +00:00
Abduqodiri Qurbonzoda
7acaf6e473
[K/N] String.indexOf matches byte sequences not on the char boundary #KT-56637
...
If the found index is odd, retry search from index + 1.
Merge-request: KT-MR-10364
Merged-by: Abduqodiri Qurbonzoda <abduqodiri.qurbonzoda@jetbrains.com >
2023-06-01 12:56:32 +00:00
Abduqodiri Qurbonzoda
2248f4ea33
Remove supportsNamedCapturingGroup flag in tests
...
Now it is true on all platforms
2023-04-26 10:44:21 +00:00
Abduqodiri Qurbonzoda
175566fe56
KT-51908 Common MatchGroupCollection.get(name) extension function
2023-04-26 10:44:21 +00:00
Abduqodiri Qurbonzoda
63a5a74613
Introduce HexFormat for formatting and parsing hexadecimals #KT-57762
...
Merge-request: KT-MR-9460
Merged-by: Abduqodiri Qurbonzoda <abduqodiri.qurbonzoda@jetbrains.com >
2023-04-26 09:54:25 +00:00
Ilya Gorbunov
ace2279631
Refactor helper function to run/not run block of common code on specific platform
...
Use it in StringBuilder tests
2023-04-25 13:55:04 +00:00
Ilya Gorbunov
454e963aa7
StringBuilder capacity test: fixup deprecation suppression
2023-04-25 13:55:04 +00:00
Igor Yakovlev
5a46cb1c40
[Wasm] Fix invalid float and double sign parser for '-Infinity' value
2023-04-04 18:39:18 +00:00
Ilya Chernikov
8a8b204e11
K2, stdlib tests: make unsigned conversions explicit
...
Allow using K2 to compile stdlib tests
related to #KT-56379
2023-03-08 09:38:47 +00:00
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