git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@634 0fc631ac-6414-0410-93d0-97cfa31319b6

This commit is contained in:
twanvl
2007-08-28 18:27:37 +00:00
parent 0914c53f0d
commit ccaea98a67
6 changed files with 42 additions and 2 deletions
+3 -1
View File
@@ -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_title]] Convert a string to title case, @"aBc" -> "Abc"@.
| [[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:format|format / format_rule]]
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.
| [[fun:remove_tag|remove_tag / tag_remove_rule]]
Remove a tag, keep the contents.
| [[fun:remove_tags]] Remove all tags from tagged text.
! [[type:list|Lists]] <<<
| [[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 <<<
| [[fun:to_html]] Convert [[type:tagged text]] to html.
| [[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:write_text_file]] Write a text file to the output directory.
| [[fun:write_image_file]] Write an image file to the output directory.
+21
View File
@@ -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 &lt; 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.
+1 -1
View File
@@ -27,4 +27,4 @@ of the font are written to the output directory.
--See also--
| [[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]].
+2
View File
@@ -12,6 +12,8 @@ Convert a [[type:tagged string]] to a normal string by removing all tags and res
--Examples--
> to_text("<b>bold text</b>") == "bold text"
> to_text("1 \< 2") == "1 < 2"
--See also--
| [[fun:to_html]] Convert [[type:tagged text]] to html.
| [[fun:remove_tags]] Remove all tags from tagged text.
+14
View File
@@ -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"