Latest 0.3.0
Homepage https://github.com/tikidunpon/SwiftMoji
License MIT
Platforms ios 8.0, requires ARC
Authors

CI Status
codecov
Version
License
[Swift-3.0]()

Usage

To run the example project, clone the repo, and run pod install from the Example directory first.

Methods

first()

"abc".first() // "a"

second()

"abc".second() // "b"

last()

"abc".last() // "c"

camelized()

"abc_def".camelized() // "AbcDef"

snakecased()

"UserId".snakecased() // "user_id"

trimmed() trimmedLeft() trimmedRight()

"   abcdef   ".trimmed()      // "abcdef"
"   abcdef   ".trimmedLeft()  // "abcdef   "
"   abcdef   ".trimmedRight() // "   abcdef"

uppercasedFirst()

"abc".uppercasedFirst() // "Abc"

lowercasedFirst()

"ABC".lowercasedFirst() // "aBC"

isCapitalized()

"Abc".isCapitalized() // "true"
"abc".isCapitalized() // "false"

isUppercased()

"ABC".isOnlyUppercased()   // "true"
"A_B_C".isOnlyUppercased() // "false"

isLowercased()

"abc".isOnlyLowercased()   // "true"
"a_b_c".isOnlyLowercased() // "false"

isUpperCamelized()

"UserId".isUpperCamelized() // "true"
"userId".isUpperCamelized() // "false"

isLowerCamelized()

"userId".isLowerCamelized() // "true"
"UserId".isLowerCamelized() // "false"

isAlphabet()

"abc".isAlphabet() // "true"
"123".isAlphabet() // "false"
"   ".isAlphabet() // "false"

isNumeric()

"-1.983388".isNumeric() // "true"
"abc".isNumeric()       // "false"

isHiragana()

"あいうえお".isHiragana() // "true"
"abc".isHiragana()      // "false"

isKatakana()

"アイウエオ".isKatakana() // "true"
"abc".isKatakana()      // "false"

Installation

SwiftMoji is available through CocoaPods. To install
it, simply add the following line to your Podfile:

pod "SwiftMoji"

Author

tikidunpon, https://twitter.com/tikidunpon

License

SwiftMoji is available under the MIT license. See the LICENSE file for more info.

Latest podspec

{
    "name": "SwiftMoji",
    "version": "0.3.0",
    "summary": "A Simple Swift String Extension",
    "description": "Simple Swift String ExtensionnIt provides method like.. 'camelized', 'snakecased' and so on...",
    "homepage": "https://github.com/tikidunpon/SwiftMoji",
    "license": "MIT",
    "authors": {
        "koichi": "[email protected]"
    },
    "source": {
        "git": "https://github.com/tikidunpon/SwiftMoji.git",
        "tag": "0.3.0"
    },
    "platforms": {
        "ios": "8.0"
    },
    "requires_arc": true,
    "source_files": "Pod/Classes/**/*",
    "xcconfig": {
        "SWIFT_VERSION": "3"
    },
    "pushed_with_swift_version": "3.0"
}

Pin It on Pinterest

Share This