Swiftpack.co - Package - creekpld/romanize

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] 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(divider: "_")
    .set(headJamo: .ㅁ, romanization: "M")
    .romanize("미안하지만 저는 이 근처 사람이 아니예요", true)

// --> Mi_an_ha_ji_Man jeo_neun i geun_cheo sa_ram_i a_ni_ye_yo

Other Implementations

License

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

Github

link
Stars: 0
Help us keep the lights on

Dependencies

Used By

Total: 0

Releases

1.2.4 - Aug 28, 2018

:bug: fixed default 'internal' protection level of with public init method

1.2.3 - Aug 28, 2018

:package: update and fix

1.2.2 - Aug 27, 2018

:package: update

1.2.1 - Aug 27, 2018

update to swift-tools-version:4.1

1.2.0 - Aug 22, 2018

:sparkles: added fluent API and configurable jamo romanization