Skip to content

Commit c131391

Browse files
Add String.remove
1 parent ef3e955 commit c131391

File tree

5 files changed

+38
-8
lines changed

5 files changed

+38
-8
lines changed

CHANGELOG.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
## [Unreleased]
44

55
### Added
6+
- `String.remove`
67

78
### Changed
89

@@ -13,10 +14,7 @@
1314
### Fixed
1415

1516
### Updated
16-
- `actions/checkout -> v2.4.0`
17-
- `com.javiersc.gradle-plugins:all-plugins -> 0.1.0-rc.4`
18-
- `gradle -> 7.3-rc-3`
1917

2018

21-
## [0.0.0] - 2021-10-15
19+
## [0.0.0] - 2021-11-04
2220
- No changes

kotlin-stdlib/api/kotlin-stdlib.api

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
public final class com/javiersc/kotlin/stdlib/StringsKt {
2+
public static final fun remove (Ljava/lang/String;Ljava/lang/String;Z)Ljava/lang/String;
3+
public static synthetic fun remove$default (Ljava/lang/String;Ljava/lang/String;ZILjava/lang/Object;)Ljava/lang/String;
4+
}
5+

kotlin-stdlib/build.gradle.kts

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,27 @@
1+
import org.jetbrains.dokka.gradle.DokkaTask
2+
13
plugins {
2-
`kotlin-jvm`
4+
`kotlin-multiplatform`
35
`javiersc-kotlin-library`
46
}
7+
8+
kotlin {
9+
explicitApi()
10+
11+
jvm()
12+
}
13+
14+
tasks.withType<DokkaTask> {
15+
dokkaSourceSets {
16+
configureEach {
17+
val paths: List<String> =
18+
file("${rootProject.projectDir}/samples/commonMain/kotlin")
19+
.walkTopDown()
20+
.filter(File::isFile)
21+
.map(File::getPath).toList()
22+
println("HELLO")
23+
println(paths)
24+
samples.from(paths)
25+
}
26+
}
27+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
package com.javiersc.kotlin.stdlib
2+
3+
/**
4+
* Returns a new string obtained by removing all occurrences of the [value] substring in this string
5+
*/
6+
public fun String.remove(value: String, ignoreCase: Boolean = false): String =
7+
replace(oldValue = value, newValue = "", ignoreCase = ignoreCase)

kotlin-stdlib/main/kotlin/Empty.kt

Lines changed: 0 additions & 3 deletions
This file was deleted.

0 commit comments

Comments
 (0)