diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2025-03-07 16:56:23 -0500 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2025-03-07 16:56:23 -0500 |
| commit | 2ebe7893fe18c953967f602c73f6d3f32185eeb6 (patch) | |
| tree | 6f2b5b83bc038907d8c387850ee3dd979bad2e71 /environment.c | |
| parent | 9b485be020b6021f2cb86d97efb5b05166901bdf (diff) | |
Add text padding functions: :left_pad(), :right_pad(), :middle_pad()
Diffstat (limited to 'environment.c')
| -rw-r--r-- | environment.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/environment.c b/environment.c index f283e693..259cdd74 100644 --- a/environment.c +++ b/environment.c @@ -409,15 +409,18 @@ env_t *new_compilation_unit(CORD libname) {"without_escaping", "Path$cleanup", "func(text:Text -> Path)"}, {"has", "Text$has", "func(text:Text, pattern:Pattern -> Bool)"}, {"join", "Text$join", "func(glue:Text, pieces:[Text] -> Text)"}, + {"left_pad", "Text$left_pad", "func(text:Text, count:Int, pad=\" \" -> Text)"}, {"lines", "Text$lines", "func(text:Text -> [Text])"}, {"lower", "Text$lower", "func(text:Text, language=\"C\" -> Text)"}, {"map", "Text$map", "func(text:Text, pattern:Pattern, fn:func(match:Match -> Text), recursive=yes -> Text)"}, {"matches", "Text$matches", "func(text:Text, pattern:Pattern -> [Text]?)"}, + {"middle_pad", "Text$middle_pad", "func(text:Text, count:Int, pad=\" \" -> Text)"}, {"quoted", "Text$quoted", "func(text:Text, color=no -> Text)"}, {"repeat", "Text$repeat", "func(text:Text, count:Int -> Text)"}, {"replace", "Text$replace", "func(text:Text, pattern:Pattern, replacement:Text, backref=$/\\/, recursive=yes -> Text)"}, {"replace_all", "Text$replace_all", "func(text:Text, replacements:{Pattern,Text}, backref=$/\\/, recursive=yes -> Text)"}, {"reversed", "Text$reversed", "func(text:Text -> Text)"}, + {"right_pad", "Text$right_pad", "func(text:Text, count:Int, pad=\" \" -> Text)"}, {"slice", "Text$slice", "func(text:Text, from=1, to=-1 -> Text)"}, {"split", "Text$split", "func(text:Text, pattern=$Pattern'' -> [Text])"}, {"starts_with", "Text$starts_with", "func(text,prefix:Text -> Bool)"}, |
