Ilya Gorbunov
f3a19ebe11
StdLib deprecations cleanup: length, size, indices and other collection operations.
2015-06-29 17:06:20 +03:00
Ilya Gorbunov
00a44f6d4f
StdLib deprecations cleanup: *array -> *arrayOf, copyToArray -> toTypedArray.
2015-06-29 17:05:57 +03:00
Ilya Gorbunov
d20d8e2106
2nd stage of replaceFirst semantics change: remove deprecated String.replaceFirst(String), rename replaceFirstLiteral to replaceFirst.
2015-06-24 21:48:09 +03:00
Ilya Gorbunov
249106647c
2nd stage of split semantics change: remove deprecated String.split(String), rename splitBy back to split. Provide replacement for splitBy and splitWithRegex (JS).
2015-06-24 21:48:07 +03:00
Ilya Gorbunov
9f85fa9720
Make proposed split replacement equivalent in behavior with additional dropLastWhile call.
...
#KT-7887
2015-06-04 16:32:23 +03:00
Ilya Gorbunov
33f5158170
Fix deprecated replaceAll and replaceFirst usages in stdlib tests and tools.
2015-05-22 16:13:55 +03:00
Ilya Gorbunov
6516c74a1a
Revert back 2nd stage of split semantics change and restore deprecated String.split(String).
2015-05-21 23:13:16 +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
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
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
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
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
Ilya Gorbunov
05b5afcb94
Add removePrefix, removeSuffix, removeEnclosing methods.
...
Deprecate trimLeading/trimTrailing/trim(String) methods in favor of new ones.
2015-03-25 03:25:53 +03:00
Ilya Gorbunov
5b2a5c78ca
Fix js-stdlib compilation and tests.
2015-03-25 03:25:27 +03:00
Ilya Gorbunov
4c58f4ec20
Add removeRange method.
...
Breaking change in replaceRange(IntRange, String) method: the end index of the range now is included in the part being replaced.
2015-03-25 03:25:14 +03:00
Ilya Gorbunov
ba15e5b295
Trimming and padding methods.
...
Kinda breaking change: Char.isWhitespace treats non-breaking spaces as whitespace too to match the Unicode definition of whitespace.
2015-03-25 03:25:01 +03:00
Ilya Ryzhenkov
be717f48f8
Stop using deprecated APIs
2014-12-16 17:33:24 +03:00
Ilya Ryzhenkov
fa0542b801
Clean size/length/first/head/empty properties and functions.
2014-12-16 17:33:21 +03:00
Zalim Bashorov
eae86e035f
Minor in stdlib: move String.trimLeading and String.trimTrailing to common place.
2014-11-18 15:57:50 +03:00
Zalim Bashorov
624f5c4c34
Minor: moved test for check the iterating over String to common place.
...
#KT-3617 Fixed
2014-11-07 16:30:50 +03:00
Zalim Bashorov
f202ad9f98
Stdlib: run all stdlib tests with JS backend(as possible).
2014-10-13 21:25:56 +04:00
Ilya Ryzhenkov
295ce5fdf8
Unify substringBefore/After and related functions, so that they always return receiver in case of missing delimiter by default.
2014-07-16 21:10:32 +04:00
Ilya Ryzhenkov
4e4d0b448c
Minor. Cleanup test.
2014-06-24 23:49:15 +04:00
Ilya Ryzhenkov
516bae17d7
StringBuilder builder and appendln
2014-06-24 23:49:15 +04:00
Ilya Ryzhenkov
0717511abe
Substring and replace before/after first/last occurrence of delimiter.
2014-06-24 23:49:15 +04:00
Alexander Udalov
607694c3c9
Fix range inclusivity in String.indices
2014-06-18 20:22:23 +04:00
Ilya Ryzhenkov
f471f7901c
Migrate to using join* functions instead of deprecated.
2014-06-10 11:11:02 +04:00
Ilya Ryzhenkov
a2a93a3830
Fix String.dropWhile & String.takeWhile
2014-06-10 11:11:01 +04:00
Ilya Ryzhenkov
cbc0e6404e
Support String in generators, and migrate generated functions.
2014-04-24 12:59:41 +04:00