Abduqodiri Qurbonzoda
54994a289f
Support all digit chars on JS and Native #KT-46002
2021-05-27 06:56:52 +03:00
Abduqodiri Qurbonzoda
57c4f79c1c
Update Char.digitToInt documentation
2021-04-20 04:36:05 +03:00
Abduqodiri Qurbonzoda
bb2a50a4eb
Fix Char.isISOControl doc
2021-04-19 19:14:17 +03:00
Abduqodiri Qurbonzoda
3a8d1c4b5e
Remove redundant @OptIn
2021-04-16 19:01:28 +03:00
Ilya Gorbunov
ce7092a638
More efficient Char(Int) in common, JS, and JS-IR
2021-04-16 03:58:34 +03:00
Abduqodiri Qurbonzoda
33b44585c4
Deprecate sumBy and sumByDouble with WARNING
2021-04-08 03:48:01 +03:00
Abduqodiri Qurbonzoda
cbef9dad36
Deprecate old Char and String case conversion api #KT-43023
2021-04-08 03:21:57 +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
29040d6f53
Remove deprecated Clock and ClockMark
2021-04-07 00:23:28 +03:00
Ilya Gorbunov
f1cdd0e2ed
Add description for kotlin.io.path package
2021-04-06 14:24:43 +03:00
Ilya Gorbunov
35ae913a5e
Stabilize new string and char case conversion API KT-45873
2021-04-03 10:39:17 +03:00
Ilya Gorbunov
256f634e61
Support all digit chars in digitToInt on JVM KT-23451
2021-04-03 10:30:50 +03:00
Ilya Gorbunov
8b85bae020
Stabilize Char-to-Int conversions KT-45874
2021-04-03 10:30:50 +03:00
Ilya Gorbunov
0e93924ff3
Duration: inWholeUnits properties instead of inUnits
...
Introduce conversion properties returning Long values,
deprecate the old ones returning Doubles.
2021-04-02 17:44:10 +03:00
Ilya Gorbunov
11d15f3343
Make Duration storage ranges symmetric and non-overlapping
...
Increase accuracy of multiplication and division.
2021-04-02 17:44:10 +03:00
Ilya Gorbunov
4fd2254f3f
Advance TestTimeSource more precisely
...
Change durations in its test so that they hold precise number
of nanoseconds
2021-04-02 17:44:08 +03:00
Ilya Gorbunov
fa7460ba48
Store Duration value as a multi-range Long
...
Now precision loss happens at bigger durations.
This changes the binary API due different underlying type of Duration.
2021-04-02 17:43:20 +03:00
Ilya Gorbunov
94240f7b21
Stabilize unsigned types KT-45653
...
Deprecate specialized unsigned iterators for removal.
Fix compiler tests:
- drop unsignedLiteralsOn1_2 because apiVersion 1.2 is no longer supported
- drop experimental unsigned literals diagnostic test
2021-03-31 19:05:04 +03:00
Svyatoslav Scherbina
8b3ff11a2b
Provide CName annotation in common stdlib as optional
2021-03-22 09:20:05 +00:00
Svyatoslav Scherbina
552bd108a9
stdlib: rename NativeAnnotationsH.kt -> NativeConcurrentAnnotations.kt
...
Also move it from libraries/stdlib/common/src/kotlin
to libraries/stdlib/src/kotlin/annotations
2021-03-22 09:20:05 +00:00
Abduqodiri Qurbonzoda
09ad5ca602
Strict version of String.toBoolean() #KT-42071
2021-03-12 09:26:55 +03:00
Ilya Gorbunov
a7fda66fa1
Suggest duration static factories instead of number extension properties
...
Introduce Duration companion functions to convert numbers to Duration.
Deprecate number extension properties and propose to use these
new functions instead.
2021-03-10 13:23:32 +03:00
Abduqodiri Qurbonzoda
e7a45bba91
Fix @SinceKotlin in Common titlecase and titlecaseChar functions
2021-03-07 07:38:04 +03:00
Abduqodiri Qurbonzoda
10b0d147af
Mark with @SinceKotlin("1.5") the Common char category API
2021-03-07 07:37:46 +03:00
Abduqodiri Qurbonzoda
421cb6971d
Optimized toArray method for ArrayDeque and ListBuilder #KT-42720
2021-03-06 11:14:50 +03:00
Abduqodiri Qurbonzoda
ed57bcb3b1
Commonize and generalize JVM-only String.contentEquals #KT-42840
2021-03-06 11:14:30 +03:00
Ilya Gorbunov
7e2c365b79
Generate docs for floorDiv and mod and improve docs for div and rem
...
Refactor operator documentation generation for primitives and unsigned
types so that it is easier to specialize it.
Manually sync docs of numeric types in js-ir stdlib.
KT-26234
2021-03-05 07:32:16 +03:00
Ilya Gorbunov
50d4979531
Floor division and remainder for numeric types KT-26234
...
- floorDiv/mod for unsigned types
- floorDiv/mod for signed types
- mod for floating point types
- mod return type: same as divisor for integer types
- Update JS API dump
- Avoid triggering division overflow in tests due to K/N
- Workaround failing test in JS-legacy
2021-03-05 07:32:16 +03:00
KotlinIsland
5e173c9f83
Minor: remove redundant suppression ( #3812 )
...
The suppression is not needed after KT-12448 has been fixed.
2021-03-04 08:18:35 +03:00
Abduqodiri Qurbonzoda
2266cd4631
Commonize Char.titlecaseChar() and Char.titlecase() #KT-44369
2021-03-02 01:11:45 +03:00
Alexander Udalov
17ee10a0d8
Minor, fix compilation warning in DurationUnit.kt
2021-02-25 21:00:09 +01:00
Ilmir Usmanov
d67e4f0c48
Rename inline class -> @JvmInline value class in stdlib and compiler
2021-02-25 16:06:51 +01:00
Dmitriy Novozhilov
99c47a0487
Fix non-exhaustive when in common stdlib
2021-02-25 14:56:08 +03:00
Ilya Gorbunov
87e130e77a
Remove obsolete diagnostics suppression
...
The diagnostic NON_PUBLIC_PRIMARY_CONSTRUCTOR_OF_INLINE_CLASS is now
obsolete because internal constructors of inline classes became allowed.
2021-02-03 18:23:53 +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
Alexander Udalov
a6b51da308
Fix compilation in the case of JDK_16 pointing to JDK 1.8
2021-01-13 21:47:23 +01:00
Ilya Gorbunov
3c37bbaf64
Duration: normalize to avoid negative zeroes (KT-44168)
...
The current comparison method of inline classes makes
durations of positive and negative zeroes non-equal.
To avoid that, normalize the duration value upon construction
preventing negative zero being stored.
2020-12-31 19:44:39 +03:00
Ilya Gorbunov
ae6f10df3b
Duration: reject NaN duration values (KT-44168)
2020-12-31 19:44:10 +03:00
Ilya Gorbunov
1d40ed39d0
KotlinVersion: Advance snapshot version 1.4.255 -> 1.5.255
...
KTI-421
2020-12-31 19:20:29 +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
Ilya Gorbunov
79e426270c
Rename Random.Default serialization surrogate object (KT-25571)
2020-12-31 06:57:17 +03:00
Iaroslav Postovalov
00506a75d3
Make Random implementations serializable (KT-25571)
...
Make Random.Default, XorWowRandom, and wrapper classes for JDK Random implement Serializable interface.
Co-authored-by: Ilya Gorbunov <ilya.gorbunov@jetbrains.com >
2020-12-31 04:10:28 +03:00
Abduqodiri Qurbonzoda
1314adb6f7
Locale-agnostic case conversions by default #KT-43023
2020-12-30 10:08:25 +03:00
Svyatoslav Scherbina
c094d77794
Fix DeepRecursiveFunction in worker on Native
...
Add `@SharedImmutable` to `UNDEFINED_RESULT` top-level property.
2020-12-14 19:03:03 +03:00
Kris
173954b3b3
Add samples for Random.nextX() functions
2020-11-11 01:37:37 +03:00
Dominik Wuttke
3acb468d48
Add a link to scope functions overview for takeIf and takeUnless
...
Co-authored-by: Dominik Wuttke <Dominik.wu@gmx.net >
2020-10-30 04:09:50 +03:00
Yuya Urano
18672c99ca
KT-20357: Add a sample for requireNotNull
2020-10-30 02:15:48 +03:00
Abduqodiri Qurbonzoda
2fd7d64db0
Promote CancellationException to stable #KT-41837
2020-10-27 05:06:50 +03:00
Derek Bodin
96834d6f4c
Update example for default buildList to not use capacity KT-41136 ( #3688 )
2020-10-15 01:56:57 +03:00