aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/documentation/lux/data
diff options
context:
space:
mode:
authorEduardo Julian2021-08-21 04:06:54 -0400
committerEduardo Julian2021-08-21 04:06:54 -0400
commit1ea83ecadccc5adee1bdb35bd11527c3982c015e (patch)
treeb2a701e6eb14469d55a4f88af3f398a7d7056121 /stdlib/source/documentation/lux/data
parent374ccf07246484eb7beb2cd87f3fc88396373ee1 (diff)
Can now produce arbitrary code fragments statically by evaluating arbitrary expressions at compile-time.
Diffstat (limited to 'stdlib/source/documentation/lux/data')
-rw-r--r--stdlib/source/documentation/lux/data/text.lux169
1 files changed, 158 insertions, 11 deletions
diff --git a/stdlib/source/documentation/lux/data/text.lux b/stdlib/source/documentation/lux/data/text.lux
index 51c28a5ef..7887d97f6 100644
--- a/stdlib/source/documentation/lux/data/text.lux
+++ b/stdlib/source/documentation/lux/data/text.lux
@@ -1,9 +1,9 @@
(.module:
[library
- [lux #*
+ [lux (#- char)
["$" documentation (#+ documentation:)]
[data
- [text (#+ \n)
+ [text
["%" format (#+ format)]]
[collection
["." list]]]]]
@@ -13,15 +13,162 @@
["#." escape]
["#." format]
["#." regex]
- ["#." unicode]])
+ ["#." unicode]]
+ [\\library
+ ["." /]])
+
+(documentation: /.Char
+ "A character code number.")
+
+(documentation: /.line_feed
+ "Same as 'new_line'.")
+
+(documentation: /.char
+ "Yields the character at the specified index."
+ [(char index input)])
+
+(documentation: /.index'
+ ""
+ [(index' from pattern input)])
+
+(documentation: /.index
+ ""
+ [(index pattern input)])
+
+(documentation: /.last_index
+ ""
+ [(last_index part text)])
+
+(documentation: /.starts_with?
+ ""
+ [(starts_with? prefix x)])
+
+(documentation: /.ends_with?
+ ""
+ [(ends_with? postfix x)])
+
+(documentation: /.enclosed_by?
+ ""
+ [(enclosed_by? boundary value)])
+
+(documentation: /.contains?
+ ""
+ [(contains? sub text)])
+
+(documentation: /.prefix
+ ""
+ [(prefix param subject)])
+
+(documentation: /.suffix
+ ""
+ [(suffix param subject)])
+
+(documentation: /.enclosed
+ "Surrounds the given content text with left and right side additions."
+ [(enclosed [left right] content)])
+
+(documentation: /.enclosed'
+ "Surrounds the given content text with the same boundary text."
+ [(enclosed' boundary content)])
+
+(documentation: /.clip
+ "Clips a chunk of text from the input at the specified offset and of the specified size."
+ [(clip offset size input)])
+
+(documentation: /.clip'
+ "Clips the remaining text from the input at the specified offset."
+ [(clip' offset input)])
+
+(documentation: /.split_at
+ ""
+ [(split_at at x)])
+
+(documentation: /.split_by
+ ""
+ [(split_by token sample)])
+
+(documentation: /.all_split_by
+ ""
+ [(all_split_by token sample)])
+
+(documentation: /.replaced/1
+ ""
+ [(replaced/1 pattern replacement template)])
+
+(documentation: /.replaced
+ ""
+ [(replaced pattern replacement template)])
+
+(documentation: /.interposed
+ ""
+ [(interposed separator texts)])
+
+(documentation: /.space?
+ "Checks whether the character is white-space."
+ [(space? char)])
(.def: .public documentation
(.List $.Module)
- (list.together
- (list /buffer.documentation
- /encoding.documentation
- /escape.documentation
- /format.documentation
- /regex.documentation
- /unicode.documentation
- )))
+ ($.module /._
+ ""
+ [..Char
+ ..line_feed
+ ..char
+ ..index'
+ ..index
+ ..last_index
+ ..starts_with?
+ ..ends_with?
+ ..enclosed_by?
+ ..contains?
+ ..prefix
+ ..suffix
+ ..enclosed
+ ..enclosed'
+ ..clip
+ ..clip'
+ ..split_at
+ ..split_by
+ ..all_split_by
+ ..replaced/1
+ ..replaced
+ ..interposed
+ ..space?
+ ($.default /.of_char)
+
+ ($.default /.\0)
+ ($.default /.null)
+ ($.default /.\a)
+ ($.default /.alarm)
+ ($.default /.\b)
+ ($.default /.back_space)
+ ($.default /.\t)
+ ($.default /.tab)
+ ($.default /.\n)
+ ($.default /.new_line)
+ ($.default /.\v)
+ ($.default /.vertical_tab)
+ ($.default /.\f)
+ ($.default /.form_feed)
+ ($.default /.\r)
+ ($.default /.carriage_return)
+ ($.default /.\'')
+ ($.default /.double_quote)
+
+ ($.default /.size)
+ ($.default /.format)
+ ($.default /.equivalence)
+ ($.default /.order)
+ ($.default /.monoid)
+ ($.default /.hash)
+ ($.default /.together)
+ ($.default /.empty?)
+ ($.default /.space)
+ ($.default /.lower_cased)
+ ($.default /.upper_cased)]
+ [/buffer.documentation
+ /encoding.documentation
+ /escape.documentation
+ /format.documentation
+ /regex.documentation
+ /unicode.documentation]))