Commit Graph

556 Commits

Author SHA1 Message Date
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
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
Ilya Gorbunov 0717705f15 Add requireNotNull with lazy message. 2015-04-01 22:28:47 +03:00
Ilya Gorbunov f87dcff723 Fixed #KT-6476. last(predicate) and lastOrNull(predicate) use reverse iteration when possible. 2015-04-01 15:51:08 +03:00
Ilya Gorbunov 850d79e61a Remove negative variants of isEmpty and isBlank (may be included later). 2015-04-01 15:40:18 +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 bb8df6be4b Restore startsWith and endsWith overloads taking single char to keep binary compatibility with markdown parser. 2015-03-31 02:25:04 +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 abdac27b61 Modify split(String) usages within stdlib. 2015-03-31 02:24:06 +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 5d7e388276 Fix of KT-7130 2015-03-30 10:55:21 +03:00
Pavel V. Talanov ed218c473a Get rid of 'class object' usages in code and builtins
Replace some comments and library usages as well
2015-03-25 18:28:00 +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 25cfd36e7c drop, take: combine implementations for Collections, Lists and Iterables.
slice: predict length of resulting list.
2015-03-25 03:26:18 +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 0484d3bf2f Imperative trim implementation to prevent double lambda expansion in inline function. 2015-03-25 03:25:40 +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 Gorbunov 0580039ded Provide additional string conversion methods to match missing java.lang.String constructors.
Fixes KT-5019
2015-03-25 03:24:48 +03:00
Mikhail Glukhikh 2bc124fa3d IO second review: empty File.subPath() allowed, OutputStream.bufferedWriter() added,
normalize(), startsWith(), endsWith() rewritten, LinesStream --> LinesSequence,
File.replaceBytes() / replaceText() rolled back to writeBytes() / writeText(),
some exception messages formulated more clearly, refactorings, comments,
relativeTo() slightly optimized, additional tests
2015-03-24 19:52:19 +03:00
Mikhail Glukhikh 88733d34eb Additional fix of String.getRootName() for network names, relevant test fixes 2015-03-24 19:40:24 +03:00
Mikhail Glukhikh 5b636eef7b Kotlin I/O review/M11 fixes: Stream --> Sequence, recurse() returned back,
additional helpers like File.bufferedReader() and String.byteInputStream(),
copyRecursively / deleteRecursively were rewritten using FileTreeWalk,
FilePathComponents introduced as a replacement of FileIterator,
classes / methods / properties permissions fixed, Linux specific things,
resolveSibling rewritten using FilePathComponents
2015-03-24 19:40:21 +03:00
Denis Mekhanikov f560677b15 Kotlin I/O new features: relativeTo, copyTo, copyRecursively, deleteRecursively, file tree walkers,
file component iterators, file roots, startsWith, endsWith, subPath, normalize, replaceBytes, replaceTest,
additional tests and comments
2015-03-24 19:40:19 +03:00
Dmitry Jemerov bd1a116c9e add documentation for recently added packages 2015-03-23 18:52:27 +01:00
Dmitry Jemerov 00697bf764 use new structure for module.md 2015-03-23 13:10:16 +01:00
Pavel V. Talanov 2a6facaef6 default -> companion: default object -> class object in project code, builtins and libs code 2015-03-17 15:46:48 +03:00
Ilya Ryzhenkov 4fa5d9cb48 Fix double "deprecated" annotation in generated sources which confuses DX compiler. 2015-03-13 19:30:46 +03:00
Ilya Ryzhenkov e448f40756 Rename Stream<T> to Sequence<T> and provide migration path via deprecated types and functions. 2015-03-12 22:56:43 +03:00
Dmitry Jemerov 32072d0a4f More standard library documentation. 2015-03-12 16:52:20 +01:00
Ilya Ryzhenkov e00cdfc8e1 toSortedMap() without a comparator requires keys that are Comparable. 2015-03-10 11:21:41 +03:00
Ilya Ryzhenkov bfeb21afb0 stdlib: stream() for Map #KT-6547 Fixed 2015-03-10 11:21:41 +03:00
Valery Kharitonov 8873be22d5 Implemented asList() method for arrays. #KT-1313 Fixed 2015-03-10 11:21:40 +03:00
Valery Kharitonov c8094e7587 Implemented indexOfFirst/Last(predicate). #KT-6577 Fixed 2015-03-10 11:21:40 +03:00
Valery Kharitonov 38a4f86db2 Implemented asIterable method for arrays. #KT-1313 Fixed 2015-03-10 11:21:39 +03:00
Laszlo Hornyak 3954215b50 Add support for + and - operators in immutable maps #KT-6594 Fixed 2015-03-10 11:21:38 +03:00
Pavel V. Talanov 59f192ef90 Replace 'class object' with 'default object' in renderers and test data
Includes changes to decompiled text
Old syntax is used in builtins and project code for now
2015-03-06 19:36:54 +03:00
Dmitry Jemerov dbe9a70fbd standard library deprecations, now with proper messages 2015-03-05 16:32:22 +01:00
Nikolay Krasko 1f79e0905f Intrinsic default objects implementation 2015-03-05 01:30:37 +03:00
Dmitry Jemerov 2cc291efdb Standard library documentation continued. 2015-03-03 11:20:30 +01:00
Pavel V. Talanov b012b9d8a3 Stdlib: Move classes out of class object in FunctionalList 2015-03-03 13:04:29 +03:00
Dmitry Jemerov 2e208c4294 revert incorrect deprecations 2015-03-02 22:16:52 +01:00
Dmitry Jemerov f41a0a328f don't deprecate AbstractIterator for now 2015-03-02 18:19:56 +01:00
Dmitry Jemerov afafdb31ee deprecate some legacy code in the standard library 2015-03-02 18:17:17 +01:00
Evgeny Gerashchenko 145bd077fc Merge pull request #570 from JetBrains/rr/yole/generate-more-stdlib
Replace some manually duplicated stdlib method implementations with generated code
2015-02-11 17:26:30 +04:00
Dmitry Jemerov 2963aea6b9 doc review 2015-02-11 12:38:07 +01:00