module Crysterm::Helpers
Overview
Mixin containing helper functions
Direct including types
Defined in:
helpers.crInstance Method Summary
-
#asort(obj)
Sorts array alphabetically by first letter of property 'name'.
-
#clean_tags(text)
Strips text of {...} tags and SGR sequences
-
#drop_unicode(text)
Drops any >U+FFFF characters in the text.
-
#escape(text)
Escapes text for tag-enabled elements where one does not want the tags enclosed in {...} to be treated specially, but literally.
-
#find_file(start, target)
Finds a file with name 'target' inside toplevel directory 'start'.
-
#hsort(obj)
Sorts array numerically by property 'index'
-
#strip_tags(text : String)
Strips text of "{...}" tags and SGR sequences and removes leading/trailing whitespaces
Instance Method Detail
Escapes text for tag-enabled elements where one does not want the tags enclosed in {...} to be treated specially, but literally.
Example to print literal "{bold}{/bold}": ''' box.set_content("escaped content: " + escape("{bold}{/bold}")) '''
Finds a file with name 'target' inside toplevel directory 'start'. XXX Possibly replace with github: mlobl/finder
Strips text of "{...}" tags and SGR sequences and removes leading/trailing whitespaces