https://github.com/uhooi/swift-string-transform
Transform strings easily in Swift.
https://github.com/uhooi/swift-string-transform
ios macos string swift tvos watchos
Last synced: 4 months ago
JSON representation
Transform strings easily in Swift.
- Host: GitHub
- URL: https://github.com/uhooi/swift-string-transform
- Owner: uhooi
- License: mit
- Created: 2021-06-12T01:25:28.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2021-12-19T11:49:10.000Z (over 3 years ago)
- Last Synced: 2024-04-24T16:19:06.057Z (about 1 year ago)
- Topics: ios, macos, string, swift, tvos, watchos
- Language: Swift
- Homepage:
- Size: 63.5 KB
- Stars: 19
- Watchers: 4
- Forks: 4
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# swift-string-transform
[](https://github.com/uhooi/swift-string-transform/actions/workflows/main.yml)
[](https://github.com/uhooi/swift-string-transform/releases/latest)
[](https://cocoapods.org/pods/StringTransform)
[](https://github.com/uhooi/swift-string-transform)
[](https://swiftpackageindex.com/uhooi/swift-string-transform)
[](https://swiftpackageindex.com/uhooi/swift-string-transform)
[](https://github.com/uhooi/swift-string-transform/blob/main/LICENSE)
[](https://twitter.com/the_uhooi)Transform strings easily in Swift.
## Table of Contents
- [Installation](#installation)
- [How to use](#how-to-use)
- [Contribution](#contribution)
- [Stats](#stats)## Installation
### Swift Package Manager (Recommended)
#### Package
You can add this package to `Package.swift`, include it in your target dependencies.
```swift
let package = Package(
dependencies: [
.package(url: "https://github.com/uhooi/swift-string-transform", .upToNextMajor(from: "0.4.0")),
],
targets: [
.target(
name: "",
dependencies: ["StringTransform"]),
]
)
```#### Xcode
You can add this package on Xcode.
See [documentation](https://developer.apple.com/documentation/swift_packages/adding_package_dependencies_to_your_app).### CocoaPods
This library is available through [CocoaPods](https://cocoapods.org). To install it, simply add the following line to your `Podfile`:
```ruby
pod 'StringTransform', '~> 0.4.0'
```### Carthage
This library is available through [Carthage](https://github.com/Carthage/Carthage). To install it, simply add the following line to your `Cartfile`:
```
github "uhooi/swift-string-transform" ~> 0.4.0
```## How to use
You can just import `StringTransform` to use it.
```swift
import StringTransform"てすと".toKatakana() // "テスト"
"テスト".toHiragana() // "てすと"
```## Contribution
I would be happy if you contribute :)
- [New issue](https://github.com/uhooi/swift-string-transform/issues/new)
- [New pull request](https://github.com/uhooi/swift-string-transform/compare)## Stats
[](https://github.com/uhooi/swift-string-transform)