Commit Graph

68 Commits

Author SHA1 Message Date
4d59fc2987 Move patterns into a module 2025-04-01 14:05:10 -04:00
1f9147187d Make docstring tests use an actual expression AST instead of text
matching
2025-03-25 15:40:59 -04:00
451634ae23 Add text width support and have that work for padding 2025-03-17 23:37:31 -04:00
9da6c52512 Remove some doctests where not needed 2025-03-11 00:09:17 -04:00
2ebe7893fe Add text padding functions: :left_pad(), :right_pad(), :middle_pad() 2025-03-07 16:56:23 -05:00
7eb1fbf5d2 Add proper language support for case operations on text 2025-03-07 16:19:12 -05:00
362146e295 Bugfix and minor perf improvements for text concatenation with unstable
clustering
2025-02-07 20:06:00 -05:00
645d66e0de Change table syntax to {key=value} and {:K,V}/{K,V} 2025-01-12 16:49:58 -05:00
acd3f2d39e Add text indexing 2024-12-26 17:31:33 -05:00
478ddad9aa Add Text:reversed() 2024-12-19 15:32:19 -05:00
37f3e91f6c Rename "NONE" to "none" 2024-12-07 16:04:25 -05:00
1e3fb8a2c0 Rename "NULL" to "NONE" 2024-11-24 16:18:21 -05:00
f868d02b08 Add NULL as a syntax for null values. 2024-11-21 13:00:53 -05:00
2c904ff173 Go back to stringifying integers/num32s/bytes without the type
constructor.
2024-11-19 13:41:52 -05:00
4720ca7a5f Rename Text.utf8_bytes back to Text.bytes 2024-11-19 13:30:45 -05:00
898bee1581 Introduce a Match struct to represent pattern matching results, which
improves the usability of a lot of the APIs. Also bugfix some issues
with ranges.
2024-11-09 16:27:54 -05:00
b8d7eabc02 Deprecate bit-width integer/num literals in favor of using type
constructors
2024-11-05 15:18:32 -05:00
aabc0a3cff Update text API to use optional returns when applicable 2024-11-04 01:17:47 -05:00
be2673ef2b Make Text:find() return an optional int 2024-11-02 13:51:58 -04:00
052316261a Finish deprecating stack refs with & 2024-10-27 20:35:30 -04:00
6d0f04375d Have Text:matches() return an optional array of matches 2024-09-16 15:12:54 -04:00
e422079fcc Add a Byte datatype 2024-09-15 15:33:47 -04:00
75e0201fad Improve automatic text quoting so it minimizes escape sequences when
possible.
2024-09-15 14:03:16 -04:00
05724a659f Change unicode escape to \{name} and add escape for ANSI CSI sequences:
\[...]
2024-09-12 01:43:00 -04:00
e16792d5eb Add Text.starts_with() and Text.ends_with() 2024-09-09 05:31:25 -04:00
b0d806a1f0 Add unicode name escapes: \U[penguin] 2024-09-07 01:43:36 -04:00
b36d4eaf67 Fix test 2024-09-06 12:17:43 -04:00
c789d25878 Text overhaul 2024-09-06 03:29:07 -04:00
44892df4c5 Add Text.trim() 2024-09-06 00:03:28 -04:00
73df39ff7e Fix stability of concatenation 2024-09-05 03:47:15 -04:00
3a556296b6 Add Text:repeat() 2024-09-04 21:22:03 -04:00
00543b4e87 Add Text.map(pat, fn) 2024-09-04 21:02:37 -04:00
df844946f7 Add Text:matches() for convenience and performance 2024-09-04 00:34:27 -04:00
b8bb4ada8b Add recursive mode to text replacement and update docs 2024-09-03 23:16:45 -04:00
850fc8fbe1 Clean up text replacement API to use backrefs instead of match_chain() 2024-09-03 22:56:53 -04:00
c14ed3e3e7 Add Text.replace_all({Pattern:Text}) and tweak API for replacement to
support placeholders
2024-09-03 20:48:11 -04:00
91c5dc61c1 Change pattern syntax from [..pat] to {pat} 2024-09-03 14:27:09 -04:00
64143f0a13 Syntax overhaul (comments back to #, print statments to !!),
using `$/.../` for patterns and using a DSL for patterns
2024-09-03 13:19:41 -04:00
5f0b099e14 Better behavior for invalid character names 2024-09-03 01:32:00 -04:00
b517f3b287 Fix codepoint names by falling back to block names 2024-09-03 01:30:07 -04:00
e98e77e1d3 Fix for missing codepoint names 2024-09-03 01:20:36 -04:00
5441e6f287 Update docs 2024-09-03 00:54:48 -04:00
6c22999ede Add text slicing 2024-09-02 23:56:08 -04:00
5aa5a5e99b Fix some stuff around Text:find() and text indexing 2024-09-02 23:47:16 -04:00
5d6fa135b1 Add Text:find_all() 2024-09-02 23:26:55 -04:00
9d2e9c02fe Fix splitting an empty string 2024-09-02 23:24:16 -04:00
6e4be93848 Add Text:join() and tests 2024-09-02 23:13:02 -04:00
6d7e09bf18 Add Text:split() and use that with an empty pattern instead of Text:clusters() 2024-09-02 23:07:08 -04:00
9214e621bf Add Text:lines() 2024-09-02 22:57:49 -04:00
5c093e6a4a Improve test 2024-09-02 22:42:02 -04:00