Skip to content

carabina/Swift-String-Tools

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Swift String Tools

A String extension that allows you to do some very awesome functions efforlessly.

###Functions

Function Name Description
detectLanguage() -> String! Detects the language of a String.
isRightToleft() -> Bool Check the text direction of a given String.
isOnlyEmptySpacesAndNewLineCharacters() ->Bool Check that a String is only made of white spaces, and new line characters.
isTweetable() -> Bool Check that a String is 'tweetable'; can be used in a tweet.
getLinks() -> [String!] Gets an array of Strings for all links found in a String.
getURLs() -> [NSURL!] Gets an array of URLs for all links found in a String.
getDates() -> [NSDate!] Gets an array of dates for all dates found in a String
getHashtags() -> [String!] Gets an array of strings (hashtags #acme) for all links found in a String.
getMentions() -> [String!] Gets an array of strings (mentions @apple) for all mentions found in a String
containsDate() -> Bool Check if a String contains a Date in it.
containsLink() -> Bool Check if a String contains a link in it.

License

String Tools is under MIT License. Check the license file for more information.

Contact Info

follow me on twitter: @jamal_2

About

Helpful tools to manage linguistics, and Social in a String.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published