Sergey Mashkov
a11e0a84b5
JS tests for addClass, removeClass, removeFromParent
2015-05-14 09:16:56 +03:00
Sergey Mashkov
4ee780ef07
JS move document/window/storage to kotlin.browser
2015-05-14 09:16:51 +03:00
Sergey Mashkov
33c1d5d2cf
JS fix tests failed due to api change
2015-05-14 09:16:50 +03:00
Ilya Gorbunov
f7aa997003
Provide fast path for negative index values in elementAt.
...
Minor: kdoc wording.
2015-05-12 21:07:24 +03:00
Ilya Gorbunov
a5ed5d4269
Generate elementAtOrNull and elementAtOrElse extension methods for iterables, collections, sequences, etc.
...
#KT-6952 Fixed
2015-05-12 20:08:20 +03:00
Dmitry Jemerov
2a99f757c4
replace 'trait' keyword with 'interface' in library code
2015-05-12 17:07:46 +02:00
Ilya Gorbunov
34526005d0
Provide a way to construct an empty typed array without init lambda.
2015-05-09 11:45:43 +03:00
Ilya Gorbunov
d531d7130f
Add an optional parameter to joinToString() and joinTo() functions: lambda function which maps the element to string.
...
#KT-5468 Fixed
2015-05-09 01:11:47 +03:00
Ilya Gorbunov
c8a76f6344
Merge overloads String.compareToIgnoreCase and String.compareTo with an optional parameter. Provide CASE_INSENSITIVE_ORDER comparer in String.Companion.
2015-05-09 01:11:45 +03:00
Ilya Gorbunov
062d080e80
CharCategory and CharDirectionality enums for JVM.
2015-05-09 01:11:36 +03:00
Ilya Gorbunov
fb5a3a771c
String.split(Pattern, limit) now treats limit differently: 0 means no limit is specified, but trailing empty elements are not stripped; -1 and other negative values are not allowed.
2015-05-09 01:11:34 +03:00
Ilya Gorbunov
b1255cf95b
2nd stage of split semantics change: remove deprecated String.split(String), rename splitBy back to split.
2015-05-09 01:11:32 +03:00
Ilya Gorbunov
aa6bdb039b
Take caution when advancing to the next match after an empty string was matched not to stuck at the same position.
2015-05-09 01:11:30 +03:00
Ilya Gorbunov
260553d516
Temporary workaround due to KT-7502.
...
Correct usage of joinToString.
Test for passing multiple options.
2015-05-09 01:11:28 +03:00
Ilya Gorbunov
81325208be
Remove Regex() and toRegex() overloads with vararg options. Now only zero, one or set of options are allowed.
2015-05-09 01:11:26 +03:00
Ilya Gorbunov
a5177b785d
Add String.replaceFirst methods.
...
String.replaceFirst(String, String) temporary named as replaceFirstLiteral.
2015-05-09 01:11:14 +03:00
Ilya Gorbunov
157c86b9c6
Empty string is supported as a delimiter in split and as an oldValue in replace.
2015-05-09 01:11:12 +03:00
Ilya Gorbunov
db13705506
Tests for match and replace.
2015-05-09 01:11:04 +03:00
Ilya Gorbunov
0b03caf3e7
Uniform implementation of String.replace and String.matches(Regex) across JVM and JS.
...
Deprecated String.matches(String) and String.replaceAll methods.
2015-05-09 01:11:03 +03:00
Ilya Gorbunov
01ace84070
Regex implementation: split, replace and replaceFirst.
2015-05-09 01:11:00 +03:00
Ilya Gorbunov
559c1604d7
Rename Pattern to Regex.
...
toRegex now converts string to our regex, and toPattern converts to JVM Pattern.
2015-05-09 01:10:59 +03:00
Ilya Gorbunov
a4784dfa78
Pattern implementation for JS.
2015-05-09 01:10:57 +03:00
Ilya Gorbunov
da1641e0f8
Pattern implementation: JVM and partially JS.
...
Common tests.
2015-05-09 01:10:55 +03:00
Ilya Gorbunov
7fba979372
Generate to[Primitive]Array() methods for generic arrays and collections.
...
#KT-4180 Fixed
2015-04-22 18:21:37 +03:00
Ilya Gorbunov
592e6582b3
Provide isInfinite() and isFinite() functions for Double and Float.
...
#KT-7126 Fixed
2015-04-22 18:21:31 +03:00
Ilya Gorbunov
5dacb5a745
Provide average() method for iterables, sequences and arrays.
...
#KT-3843 Fixed
2015-04-22 18:21:29 +03:00
Ilya Gorbunov
ccc3646bb8
Generate coerceAtLeast, coerceAtMost and coerceIn extension functions for numbers and other Comparables.
2015-04-22 18:20:47 +03:00
Ilya Gorbunov
ade69ec0e9
Provide the emptySequence() method.
...
sequenceOf() with no arguments is equivalent to emptySequence().
#KT-7233 Fixed
2015-04-22 17:57:26 +03:00
Ilya Gorbunov
899a01e8c2
Rename sequence() extension to asSequence()
2015-04-22 17:57:20 +03:00
Ilya Gorbunov
be11394adf
Rename copyToArray() to toTypedArray().
2015-04-21 21:27:28 +03:00
Ilya Gorbunov
5eb3c0bb5e
Rename *array() factory methods to *arrayOf().
2015-04-21 21:27:26 +03:00
Ilya Gorbunov
043b27bfe5
Make more generic signature for reduce and reduceRight methods.
...
Fixes #KT-2287
2015-04-15 17:34:08 +03:00
Nikolay Krasko
2946c1d6a8
KT-7271 Accessing an extension property of Char.Companion leads to ClassNotFoundException in runtime
...
#KT-7271 Fixed
2015-04-07 15:59:05 +03:00
Ilya Gorbunov
fbb567c11a
Iterator<T> can be converted to a sequence constrained to be one-time iterable.
2015-04-07 15:35:01 +03:00
Ilya Gorbunov
f2d865e836
Provide constrainOnce extension method for the Sequence.
...
Sequence created from the generator function without an initial value can be iterated only once.
The same is for BufferedReader.lines sequence.
2015-04-07 15:34:59 +03:00
Ilya Gorbunov
698ffa2807
A sequence constructed with initialValue can be iterated multiple times.
2015-04-07 15:31:00 +03:00
Stanislav Erokhin
b703f59e04
Migrate kotlin sources, maven projects and stdlib to new lambda syntax
2015-04-07 13:08:53 +03:00
Ilya Gorbunov
7cac6e3c5e
Provide String.commonPrefixWith and String.commonSuffixWith methods.
...
Char.isHighSurrogate and Char.isLowSurrogate now available in js-stdlib too.
2015-04-07 03:15:03 +03:00
Ilya Gorbunov
91decc9f33
Add String.contains with Char argument. Fixes #KT-7239.
2015-04-07 03:14:36 +03:00
Ilya Gorbunov
cac058d5a3
Fix endsWith in JS always ignored character case, regardless of the ignoreCase parameter value.
...
startsWith, endsWith again use native implementation when possible.
2015-04-01 23:10:14 +03:00
Ilya Gorbunov
0717705f15
Add requireNotNull with lazy message.
2015-04-01 22:28:47 +03:00
Ilya Gorbunov
ac4b207413
Add isEmpty, isBlank methods and their nullable and negating couterparts.
2015-04-01 15:40:17 +03:00
Ilya Gorbunov
536a977f5c
indexOfAny, lastIndexOfAny return an index value only (similar to indexOf, lastIndexOf).
...
findAnyOf, findLastAnyOf introduced to cover the case when an index and a matched string value is required.
2015-03-31 02:25:19 +03:00
Ilya Gorbunov
b3165ac771
Rename split method to splitBy and revive old split implementation interpreting parameter as regex to provide the migration path.
2015-03-31 02:24:50 +03:00
Ilya Gorbunov
d724ce3f7e
Add code generation for asList methods in js.libraries.
2015-03-31 02:24:20 +03:00
Ilya Gorbunov
6f7a4d8429
Add methods for String: indexOfAny, lastIndexOfAny, indexOf, lastIndexOf, rangesDelimitedBy, splitToSequence, split, lineSequence, lines.
...
Add methods for Char: toUpperCase, toLowerCase.
Add an optional boolean parameter ignoreCase to the methods Char.equals, String.equals, String.startsWith, String.endsWith, String.contains.
2015-03-31 02:23:52 +03:00
Mikhail Glukhikh
ef6698bd52
Test fixed
2015-03-30 10:55:24 +03:00
Mikhail Glukhikh
5d7e388276
Fix of KT-7130
2015-03-30 10:55:21 +03:00
Ilya Gorbunov
a34e15e157
Rename methods: trimLeft/Right -> trimStart/End, padLeft/Right -> padStart/End
2015-03-25 03:26:31 +03:00
Ilya Gorbunov
4a7918b0a1
Add takeLast method for String, lists and arrays.
...
Check the parameter n in drop, take and takeLast methods.
2015-03-25 03:26:06 +03:00