Popularity
0.2
Stable
Activity
0.0
Stable
3
2
0

Description

Romanies a String of Hangul Characters

This is the swift library written in swift version 4.0

Programming language: Swift
License: MIT License
Tags: Utility     iOS     macOS     Linux     SwiftLang     Swift    
Latest version: v1.2.6

Romanize alternatives and similar libraries

Based on the "Utility" category.
Alternatively, view Romanize alternatives based on common mentions on social networks and blogs.

Do you think we are missing an alternative of Romanize or a related project?

Add another 'Utility' Library

README

This is not the Repo you are looking for! :alien:

New development is taking place in gitlab.com/pdylong/romanize :ok_hand:.

Romanize

Romanizes a String of Hangul Characters

This is the swift library written in swift version 4.0

Features

  • [x] fluent API
  • [x] fully configurable jamo romanization
  • [x] configurable syllable divider
  • [x] generate random hangul syllables
  • [x] API backwards compatibility

Installation

Install it with the Swift Package Manager.

// swift-tools-version:4.0

import PackageDescription

let package = Package(
    name: "YourApp",
    products: [
        .executable(name: "YourApp", targets: ["YourApp"]),
    ],
    dependencies: [
        .Package(url: "https://github.com/creekpld/romanize.git", from: "1.0.0")
    ],
    targets: [
        .target(
            name: "YourApp",
            dependencies: ["Romanize"],
            path: "Sources"),
    ]
)

Usage

or

import Romanize

romanize("안녕 하세요") // --> annyeong haseyo
romanize("안녕 하세요", true) // --> an-nyeong ha-se-yo

Usage with fluent API

Romanize()
    // set a custom syllable divider
    .set(divider: "_")
    // customize all jamos and romanization
    .set(headJamo: .ㅁ, romanization: "M")
    .romanize("미안하지만 저는 이 근처 사람이 아니예요", true)

// --> Mi_an_ha_ji_Man jeo_neun i geun_cheo sa_ram_i a_ni_ye_yo

Other Features

Romanize()
    // generate 10 random hangul syllables 
    .genHan(10)

// something like this --> 믞쑠졮폦둨햅쵫멫쾜숛

Other Implementations

License

Romanize is available as open source under the terms of the MIT License.


*Note that all licence references and agreements mentioned in the Romanize README section above are relevant to that project's source code only.