Kris Hall
ee952db1a2
Added samples for String.replace() function
2021-01-12 14:59:43 +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
Kris
173954b3b3
Add samples for Random.nextX() functions
2020-11-11 01:37:37 +03:00
Kris
ebdd023633
Add samples for last() and lastOrNull() functions
2020-11-11 01:37:24 +03:00
Uzi Landsmann
f48f7c6dca
Added samples for the kotlin.system package (measureTime* functions)
...
Co-authored-by: Ilya Gorbunov <ilya.gorbunov@jetbrains.com >
2020-10-30 03:35:15 +03:00
Uzi Landsmann
15381c4662
Added samples for the kotlin.streams package
...
Co-authored-by: Uzi Landsmann <uzi.landsmann@bisnode.com >
2020-10-30 02:23:31 +03:00
Yuya Urano
18672c99ca
KT-20357: Add a sample for requireNotNull
2020-10-30 02:15:48 +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
kvirolainen
36984009e9
Add samples for flatten, unzip functions
2020-08-10 03:40:13 +03:00
Elijah Verdoorn
41d5615608
Add samples for mapNotNull, find, getOrNull functions
2020-08-10 03:39:49 +03:00
Dat Trieu
1009a240f2
KT-20357: Add samples for filter functions
2020-08-06 23:41:12 +03:00
Julian Kotrba
88f508446a
Make repeat example more expressive
...
This commit adds the zero-based index of current iteration from the passed HOF "action" of the repeat function to its associated code sample.
KT-20357
2020-08-04 00:48:06 +03:00
Abduqodiri Qurbonzoda
a04f70fb36
Fix min/maxByOrNull function samples
2020-06-26 07:16:01 +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
Valeriy.Vyrva
c023a02884
Create SortedMap with Comparator and items
...
KT-34142
2020-06-04 02:04:22 +03:00
Dmitry Borodin
dd46d5ca5a
Add sample for Map.flatMap
2020-05-19 19:24:00 +03:00
Dmitry Borodin
1a0b59da49
KT-20357 Add sortedBy() sample ( #3283 )
2020-05-19 19:21:21 +03:00
Segun Famisa
d6a8003743
Add samples for String/CharSequence filter & filterNot ( #3390 )
...
* Add samples for String/CharSequence filter & filterNot
* Link samples to stdlib generator
2020-05-18 23:15:41 +03:00
Ilya Gorbunov
5d724a8cbc
Fix samples package import
...
Dokka can only clean samples.* import when converting samples to
runnable.
2020-05-12 17:35:33 +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
Miguel Serra
61ad32f012
Samples of Map functions "contains" and "isNotEmpty"
...
Co-authored-by: Ilya Gorbunov <ilya.gorbunov@jetbrains.com >
2020-03-31 04:54:51 +03:00
Ilya Gorbunov
606b4db48a
Improve samples for partition: add destructuring
2020-03-31 02:04:56 +03:00
n-p-s
7bb7c86fa9
Add samples for partition
2020-03-31 02:04:55 +03:00
Ilya Gorbunov
dd2aa3de28
Add sample for filterNot and improve sample for filter
2020-03-31 02:04:55 +03:00
Brian Plummer
f887a29279
Add sample for filter
2020-03-31 02:04:55 +03:00
adammc331
840f222867
Add sample for filterNotNull
2020-03-31 02:04:55 +03:00
Scott Weber
e8ee405cdb
Add sample for text version of chunked
2020-03-31 02:04:55 +03:00
Abduqodiri Qurbonzoda
b1fac4e721
Implement reduceIndexedOrNull and reduceRightIndexedOrNull #KT-36866
2020-03-12 18:08:55 +03:00
Alexander Udalov
787e4503e5
Migrate -Xuse-experimental -> -Xopt-in in project sources
2020-03-10 12:07:15 +01:00
Abduqodiri Qurbonzoda
ce8e511b79
Add setOfNotNull function #KT-35851
2020-02-18 02:33:59 +03:00
Mikhail Zarechenskiy
155b716e7e
Revert "Disable NewInference for stdlib tests"
...
This reverts commit cdf5323f8c .
2020-02-17 10:29:46 +03:00
Mikhail Zarechenskiy
cdf5323f8c
Disable NewInference for stdlib tests
...
There is one failing test namely `ValByMapExtensionsTest.doTest`, which
is quite questionable because its checks the use of out projection and
Exact annotation (see KT-18789)
2020-02-13 11:15:56 +03:00
Abduqodiri Qurbonzoda
ed7b8e9b85
Scan functions for Sequences and Iterable #KT-7657
2020-02-13 04:01:47 +03:00
Ilya Gorbunov
4aa7d45a5a
KT-15363 Collection builders: improve tests and samples
2020-01-24 15:28:17 +03:00
Fleshgrinder
bf9d3d87a6
KT-15363 Collection Builders
...
Added container builders for lists, sets, and maps.
The new experimental type inference only works for the simple builders
with a single generic type. The versions with nullability and the maps
still require explicit specification of the types. Obviously explicit
specification is required for all users who are not using the new
experimental inference. Improving the type inference is something that
should be done separately and many things – including these builders –
will benefit from it, however, this is not a blocker for these builders
in my opinion.
2020-01-24 15:28:17 +03:00
Miguel Serra
4fa5e2d85c
KT-20357: Add samples for linkedSetOf
2019-12-26 20:07:39 +03:00
Tillmann Berg
95300ae31d
KT-20357: Add sample for reduce, reduceRight and their indexed counterparts
2019-12-26 19:57:33 +03:00
Alfredo Delli Bovi
9546307243
Add sample for reduceOrNull and reduceRightOrNull
2019-12-26 19:27:46 +03:00
Tillmann Berg
cf86dc9a89
KT-20357: Add sample for Collections distinct and distinctBy methods
2019-12-11 07:42:05 +03:00
Ilya Gorbunov
555d503ff9
Improve indexOf sample to showcase return value handling
...
Remove sample reference from indexOf(Char) overload: both overloads are on
the same page, and showing the sample for indexOf(String) under indexOf(Char)
is redundant and misleading.
2019-11-29 21:34:49 +03:00
Burak Eregar
e30d87ee01
KT-20357: Add samples for indexOf
2019-11-29 21:34:49 +03:00
Dmitry Borodin
664d69b752
Add flatMap sample KT-20357
2019-11-29 17:35:06 +03:00
Dat Trieu
f334ad2ffc
KT-20357: Add samples for associate* functions ( #2798 )
...
* KT-20357: Add samples for functions related to associate
* KT-20357: Use same fib function for both samples
* KT-20357: Use examples with duplicate keys and simplify examples with primitives
* KT-20357: Use primitive samples for all arrays
* KT-20357: Use String splitting example to better illustrate the use for associate over associateBy with a valueSelector
2019-11-29 16:54:02 +03:00
Yanis Batura
e9e3df23fc
Fix typos and improve grammar in stdlib readmes ( #2527 )
...
* Fix typos in the main ReadMe.md
* Fix typos in the stdlib samples ReadMe.md
Co-Authored-By: ilya-g <ilya.gorbunov@jetbrains.com >
2019-08-16 19:56:56 +03:00
Ilya Gorbunov
4fc942c5e9
KT-16602: Improve mutable sorting samples, fix sample references
2019-07-12 21:34:54 +03:00
Dat Trieu
38d26b1d92
KT-16602: Provide samples for sorting API usage
2019-07-12 21:32:03 +03:00
keijumt
3f5d64e635
Add sample of hashMapOf
2019-07-12 17:10:15 +03:00
Ilya Gorbunov
58b04c7974
Add remaining docs for Duration members, runnable samples for toString
2019-06-18 04:02:35 +03:00
Benjamin Orsini
3e39f26379
Add map() documentation sample
...
* docs: add map() sample
* docs: add samples for Map and CharSequence
* docs: add another sample for Maps.map()
2019-05-20 19:20:09 +03:00