jvmMain.com.copperleaf.json.utils.SplitTransformer.desktop.kt Maven / Gradle / Ivy
package com.copperleaf.json.utils
import org.apache.commons.lang3.StringUtils
import java.net.URLEncoder
public actual val SplitTransformer.SplitterScope.camelCase: SplitTransformer.Splitter
get() = SplitTransformer.Splitter {
StringUtils.splitByCharacterTypeCamelCase(it).toList()
}
public actual val SplitTransformer.SplitterScope.words: SplitTransformer.Splitter
get() = SplitTransformer.Splitter {
StringUtils.splitByWholeSeparator(it, null).toList()
}
public actual val SplitTransformer.TransformerScope.urlEncoded: SplitTransformer.Transformer
@Suppress("NewApi")
get() = SplitTransformer.Transformer { _, piece ->
URLEncoder.encode(piece, Charsets.UTF_8)
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy