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
44d7f768c7
Visibility of Regex primary constructor. Provide adapting methods Pattern.toRegex and Regex.toPattern.
2015-05-09 01:11:24 +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
2ae767a049
Add deprecated matcher() method to Regex to fix build.
2015-05-09 01:11:08 +03:00
Ilya Gorbunov
5f4e3ae6af
Documentation and visibility of members.
...
Add hasMatch method to check whether there is at least one match exists.
IGNORE_CASE always includes UNICODE_CASE on JVM.
2015-05-09 01:11:07 +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
459e95d1d9
Pattern (Regex) API.
2015-05-09 01:10:53 +03:00
Ilya Gorbunov
526348b207
Implement toTypedArray as non-intrinsic.
...
Remove unused intrinsic method.
2015-04-23 14:10:42 +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
9759be5493
Generate sum() methods for arrays, iterables and sequences of Byte and Short. These overloads got explicit platformName.
...
Heuristics to decide when to set platformName.
#KT-3714
2015-04-22 18:21:24 +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
ae28379493
Provide Enumeration<T>.asSequence() method to make Enumeration usable in chained operations
...
#KT-6828 Fixed
2015-04-22 17:57:24 +03:00
Ilya Gorbunov
899a01e8c2
Rename sequence() extension to asSequence()
2015-04-22 17:57:20 +03:00
Ilya Gorbunov
9ed2cb3858
Provide zip() and merge() overloads for primitive arrays with themselves.
...
Better predicting size of resulting list of plus() operation.
#KT-4968 Fixed
2015-04-22 03:19:30 +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
58310d172f
Deprecate sequence implementations in favor of sequence operations.
2015-04-21 21:27:24 +03:00
Ilya Gorbunov
b2b98502e9
Deprecate Int.latch and Int.indices extensions.
2015-04-21 21:27:22 +03:00
Denis Zharkov
6ef2340eb5
Migrate type of throws parameter to KClass
...
Change declaration, testData and codegen parts for `throws`
2015-04-21 08:08:31 +03:00
Pavel V. Talanov
94cc847c48
Drop module "ktm" scripts and support java source roots in "xml" modules
...
Drop kotlin.modules package from runtime
Move adapted classes into compiler
Unsupport files with "ktm" extension
Delete code for loading module scripts
Drop tests for module scripts
Separate section for java source roots in xml script generator/parser
2015-04-16 16:40:19 +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
Ilya Gorbunov
845d755fdd
Make Char-related constants to be properties in Char companion object.
2015-04-10 15:22:02 +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
Stanislav Erokhin
4ef086ea57
Minor. Removed obsolete comment
2015-04-07 13:08:51 +03:00
Stanislav Erokhin
6ab83c9b8c
Added init keyword to builtins, maven projects and stdlib
2015-04-07 13:08:50 +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
70cc7fbf1f
Remove never intentionally used String.hashCode extension.
2015-04-07 03:14:49 +03:00
Ilya Gorbunov
91decc9f33
Add String.contains with Char argument. Fixes #KT-7239.
2015-04-07 03:14:36 +03:00
Ilya Gorbunov
cb85d335ba
Correct deprecated message for trim()
...
Correct documentation description.
2015-04-07 03:14:22 +03:00
Michael Nedzelsky
1c7e1ddf26
JS: remove LibrarySourcesConfigWithCaching, introduce LibrarySourceConfig.Builder
2015-04-03 05:36:18 +03:00
Michael Nedzelsky
0951d69bdc
JS: add metaInfo attribute to Config
2015-04-03 05:35:56 +03:00
Dmitry Jemerov
7b507276ed
frontend diagnostics for kotlin.jvm.overloads
...
#KT-7203 Fixed
2015-04-02 20:30:36 +02:00
Dmitry Jemerov
e15b984232
Implement kotlin.jvm.overloads annotation for generating all overloads of a method that has default parameter values.
...
#KT-2095 Fixed
2015-04-02 20:30:01 +02:00