Created
December 26, 2017 15:03
-
-
Save TerryCK/17e12c55f21307a383cc36598646a03d to your computer and use it in GitHub Desktop.
String+Extension in playground
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
extension String { | |
static var txtLocoal: String { | |
return "txtLocoal".localized() | |
} | |
func localized() -> String { | |
return "localized String \(self)" | |
} | |
} | |
func methods(with string: String) -> String { | |
return string | |
} | |
//: ## Usage | |
let result = methods(with: .txtLocoal) | |
print(result) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment