All Downloads are FREE. Search and download functionalities are using the official Maven repository.

jvmMain.com.copperleaf.json.utils.SplitTransformer.desktop.kt Maven / Gradle / Ivy

There is a newer version: 0.7.0
Show newest version
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