Skip to content

Instantly share code, notes, and snippets.

View mturilin's full-sized avatar

Mikhail Turilin mturilin

  • Google
  • San Francisco, CA
View GitHub Profile
@frankrausch
frankrausch / String+Hyphenation.swift
Last active June 15, 2023 16:45
Returns a String with soft hyphens (U+00AD)
import Foundation
extension String {
func hyphenated(languageCode: String) -> String {
let locale = Locale(identifier: languageCode)
return self.hyphenated(locale: locale)
}
func hyphenated(locale: Locale) -> String {