Enigma String

Functions

trim_first_enigma_font_tags

enigma_string.trim_first_enigma_font_tags(string)

View source

Trims the first font tags and returns the result as an instance of FCFontInfo.

Input Type Description
string FCString this is both the input and the trimmed output result
Return type Description
FCFontInfo | nil the first font info that was stripped or nil if none

change_first_string_font

enigma_string.change_first_string_font(string, font_info)

View source

Replaces the first enigma font tags of the input enigma string.

Input Type Description
string FCString this is both the input and the modified output result
font_info FCFontInfo replacement font info
Return type Description
boolean true if success

change_first_text_block_font

enigma_string.change_first_text_block_font(text_block, font_info)

View source

Replaces the first enigma font tags of input text block.

Input Type Description
text_block FCTextBlock this is both the input and the modified output result
font_info FCFontInfo replacement font info
Return type Description
boolean true if success

change_string_font

enigma_string.change_string_font(string, font_info)

View source

Changes the entire enigma string to have the input font info.

Input Type Description
string FCString this is both the input and the modified output result
font_info FCFontInfo replacement font info

change_text_block_font

enigma_string.change_text_block_font(text_block, font_info)

View source

Changes the entire text block to have the input font info.

Input Type Description
text_block FCTextBlock this is both the input and the modified output result
font_info FCFontInfo replacement font info

remove_inserts

enigma_string.remove_inserts(fcstring, replace_with_generic, convert_tags_to_literals)

View source

Removes text inserts other than font and text formatting commands and either removes or replaces them with generic text

Input Type Description
fcstring FCString this is both the input and the modified output result
replace_with_generic boolean if true, replace the insert with the text of the enigma command
convert_tags_to_literals boolean if true, converts the tags to literal text by escaping the carets (“^”) with double-carets (“^^”); replace_with_generic must also be true

expand_value_tag

enigma_string.expand_value_tag(fcstring, value_num)

View source

Expands the value tag to the input value_num.

Input Type Description
fcstring FCString this is both the input and the modified output result
value_num number the value number to replace the tag with

calc_text_advance_width

enigma_string.calc_text_advance_width(inp_string)

View source

Calculates the advance width of the input string taking into account all font and style changes within the string.

Input Type Description
inp_string FCString this is an input-only value and is not modified
Return type Description
number the width of the string