String
struct String
Prestyler uses a public extension to provide access to string formatting. Next methods can be used for every string.
-
Convert string to attributed string by looking for embeded tag and find sutable patterns.
Declaration
Swift
func prestyled() -> NSAttributedString
Return Value
Attributed string
-
Convert string to attributed string by using provided rule pattern.
Declaration
Swift
func prestyledBy(rule: String) -> NSAttributedString
Parameters
rule
pattern rule to apply
Return Value
attributed string
-
Convert string to attributed string by using provided styles.
Declaration
Swift
func prestyledBy(styles: Any...) -> NSAttributedString
Parameters
styles
styles to apply
Return Value
attributed string
-
Find all occurence of given type entries and embrace it with tags.
Declaration
Swift
func prefilter(type: PrefilterType, by tag: String) -> String
-
Find all occurence of given text and embrace it with tags.
Declaration
Swift
func prefilter(text: String, by tag: String) -> String