Skip to content

swiftpackages/SuperString

Repository files navigation

Super String for Swift

macOS ubuntu docs Codacy Badge

Extend the power of Strings in Swift.

Getting Started

You can easily add as a requirement with SwiftPM.

Know what you’re doing?

Here are some quick copypastas for you

.package(url: "https://github.com/swiftpackages/SuperString.git", from: "1.0.0"),
.product(name: "SuperString", package: "SuperString"),

Need a reminder?

Your Package.swift file should look something like this

// swift-tools-version:5.3

import PackageDescription

let package = Package(
    name: "SuperCoolProject",
    products: [
        .library(
            name: "SuperCoolProject",
            targets: ["SuperCoolProject"]),
    ],
    dependencies: [
        .package(url: "https://github.com/swiftpackages/SuperString.git", from: "1.0.0"),
    ],
    targets: [
        .target(
            name: "SuperCoolProject",
            dependencies: [
                .product(name: "SuperString", package: "SuperString"),
            ]),
        .testTarget(
            name: "SuperCoolProject",
            dependencies: ["SuperCoolProject"])
    ]
)

Usage

"ThisIs a Cool string".camelcased() // thisIsACoolString

"ThisIs a Cool string".camelcased(.upper) // ThisIsACoolString

"ThisIs a Cool string".pascalcased() // ThisIsACoolString

"ThisIs a Cool string".kebabcased() // this-is-a--cool-string

"ThisIs a Cool string".snakecased() // this_is_a__cool_string

Additional Documentation

You can find the full documentation on the documentation website.

Releases

No releases published

Sponsor this project

Packages

No packages published

Languages