Verified Commit e4c3db6a authored by AtjonTV's avatar AtjonTV

extensions: String.trimSpace; Removes all spaces from String

parent cd4b7fc4
......@@ -14,6 +14,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- IncompatibleDatabaseException (`klib.exceptions.IncompatibleDatabaseException`)
- `openFFDB` extension for String
- `splitBy` extension for String
- `trimSpace` extension for String
### Changed
- Upgraded Kotlin from 1.3.61 to 1.3.70
### Deprecated
......
......@@ -444,4 +444,14 @@ fun String.splitBy(num: Int = 1): List<String> {
list.add(substring(i - num, i))
return list
}
/**
* Trim ALL the Spaces
*
* @since 5.0.0
* @author Thomas Obernosterer
*/
fun String.trimSpace(): String {
return this.replace(" ", "")
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment