Commit Graph

29 Commits

Author SHA1 Message Date
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 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 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 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 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
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 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
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
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 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 cbc0e6404e Support String in generators, and migrate generated functions. 2014-04-24 12:59:41 +04:00
Ilya Ryzhenkov e37d8174c3 New stdlib generators 2014-03-19 20:25:11 +04:00