mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-10 04:57:00 -04:00
git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@634 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
@@ -7,6 +7,7 @@ These functions are built into the program, other [[type:function]]s can be defi
|
|||||||
| [[fun:to_lower]] Convert a string to lower case, @"aBc" -> "abc"@.
|
| [[fun:to_lower]] Convert a string to lower case, @"aBc" -> "abc"@.
|
||||||
| [[fun:to_title]] Convert a string to title case, @"aBc" -> "Abc"@.
|
| [[fun:to_title]] Convert a string to title case, @"aBc" -> "Abc"@.
|
||||||
| [[fun:reverse]] Reverse a string, @"aBc" -> "cBa"@.
|
| [[fun:reverse]] Reverse a string, @"aBc" -> "cBa"@.
|
||||||
|
| [[fun:trim]] Remove leading and trailing whitespace from a string, @" abc " -> "abc"@.
|
||||||
| [[fun:substring]] Extract a part of a string.
|
| [[fun:substring]] Extract a part of a string.
|
||||||
| [[fun:format|format / format_rule]]
|
| [[fun:format|format / format_rule]]
|
||||||
Format a number as a string (printf).
|
Format a number as a string (printf).
|
||||||
@@ -27,6 +28,7 @@ These functions are built into the program, other [[type:function]]s can be defi
|
|||||||
Change the contents of a specific tag.
|
Change the contents of a specific tag.
|
||||||
| [[fun:remove_tag|remove_tag / tag_remove_rule]]
|
| [[fun:remove_tag|remove_tag / tag_remove_rule]]
|
||||||
Remove a tag, keep the contents.
|
Remove a tag, keep the contents.
|
||||||
|
| [[fun:remove_tags]] Remove all tags from tagged text.
|
||||||
|
|
||||||
! [[type:list|Lists]] <<<
|
! [[type:list|Lists]] <<<
|
||||||
| [[fun:position]] Find the position of an element in a list.
|
| [[fun:position]] Find the position of an element in a list.
|
||||||
@@ -75,7 +77,7 @@ These functions are built into the program, other [[type:function]]s can be defi
|
|||||||
! HTML export <<<
|
! HTML export <<<
|
||||||
| [[fun:to_html]] Convert [[type:tagged text]] to html.
|
| [[fun:to_html]] Convert [[type:tagged text]] to html.
|
||||||
| [[fun:symbols_to_html]] Convert text to html using a [[type:symbol font]].
|
| [[fun:symbols_to_html]] Convert text to html using a [[type:symbol font]].
|
||||||
| [[fun:to_text]] Remove all tags from tagged text.
|
| [[fun:to_text]] Remove all tags from tagged text, and convert it to a [[type:string]].
|
||||||
| [[fun:copy_file]] Copy a file from the [[type:export template]] to the output directory.
|
| [[fun:copy_file]] Copy a file from the [[type:export template]] to the output directory.
|
||||||
| [[fun:write_text_file]] Write a text file to the output directory.
|
| [[fun:write_text_file]] Write a text file to the output directory.
|
||||||
| [[fun:write_image_file]] Write an image file to the output directory.
|
| [[fun:write_image_file]] Write an image file to the output directory.
|
||||||
|
|||||||
@@ -0,0 +1,21 @@
|
|||||||
|
Function: remove_tags
|
||||||
|
|
||||||
|
--Usage--
|
||||||
|
> remove_tags(some_tagged_text)
|
||||||
|
|
||||||
|
Removing all tags from a [[type:tagged string]].
|
||||||
|
|
||||||
|
This function differs from [[fun:to_text]], that function also un-escapes < characters.
|
||||||
|
|
||||||
|
--Parameters--
|
||||||
|
! Parameter Type Description
|
||||||
|
| @input@ [[type:tagged string]] String to remove tags from
|
||||||
|
|
||||||
|
--Examples--
|
||||||
|
> remove_tags("<b>bold text</b>") == "bold text"
|
||||||
|
> remove_tags("1 \< 2") == "1 \< 2"
|
||||||
|
|
||||||
|
--See also--
|
||||||
|
| [[fun:to_text]] Remove all tags from tagged text, and convert it to a [[type:string]].
|
||||||
|
| [[fun:remove_tag|remove_tag / tag_remove_rule]]
|
||||||
|
Remove a single tag type.
|
||||||
@@ -27,4 +27,4 @@ of the font are written to the output directory.
|
|||||||
|
|
||||||
--See also--
|
--See also--
|
||||||
| [[fun:symbols_to_html]] Convert text to html using a [[type:symbol font]].
|
| [[fun:symbols_to_html]] Convert text to html using a [[type:symbol font]].
|
||||||
| [[fun:to_text]] Remove all tags from tagged text.
|
| [[fun:to_text]] Remove all tags from tagged text, and convert it to a [[type:string]].
|
||||||
|
|||||||
@@ -12,6 +12,8 @@ Convert a [[type:tagged string]] to a normal string by removing all tags and res
|
|||||||
|
|
||||||
--Examples--
|
--Examples--
|
||||||
> to_text("<b>bold text</b>") == "bold text"
|
> to_text("<b>bold text</b>") == "bold text"
|
||||||
|
> to_text("1 \< 2") == "1 < 2"
|
||||||
|
|
||||||
--See also--
|
--See also--
|
||||||
| [[fun:to_html]] Convert [[type:tagged text]] to html.
|
| [[fun:to_html]] Convert [[type:tagged text]] to html.
|
||||||
|
| [[fun:remove_tags]] Remove all tags from tagged text.
|
||||||
|
|||||||
@@ -0,0 +1,14 @@
|
|||||||
|
Function: trim
|
||||||
|
|
||||||
|
--Usage--
|
||||||
|
> trim(some_string)
|
||||||
|
|
||||||
|
Remove leading and trailing whitespace from a string.
|
||||||
|
|
||||||
|
--Parameters--
|
||||||
|
! Parameter Type Description
|
||||||
|
| @input@ [[type:string]] String to remove whitespace from.
|
||||||
|
|
||||||
|
--Examples--
|
||||||
|
> trim(" abc ") == "abc"
|
||||||
|
> trim(" one two three ") == "one two three"
|
||||||
@@ -111,6 +111,7 @@ The rest of the properties depend on the type of [[type:field]] this style is fo
|
|||||||
|
|
||||||
! <<< <<< <<< <<<
|
! <<< <<< <<< <<<
|
||||||
| @"image"@ @mask@ [[type:scriptable]] [[type:filename]] ''none'' A mask to apply to the image, black areas in the mask become transparent, similair to [[fun:set_mask]].
|
| @"image"@ @mask@ [[type:scriptable]] [[type:filename]] ''none'' A mask to apply to the image, black areas in the mask become transparent, similair to [[fun:set_mask]].
|
||||||
|
| ^^^ @angle@ [[type:scriptable]] [[type:int]] @0@ Rotation of the image inside the box, in degrees.
|
||||||
| ^^^ @default@ [[type:image|scriptable image]] ''none'' A default image to use when the card has none.
|
| ^^^ @default@ [[type:image|scriptable image]] ''none'' A default image to use when the card has none.
|
||||||
|
|
||||||
! <<< <<< <<< <<<
|
! <<< <<< <<< <<<
|
||||||
|
|||||||
Reference in New Issue
Block a user