diff options
author | Ryan Dahl <ry@tinyclouds.org> | 2019-10-09 17:10:09 -0400 |
---|---|---|
committer | Ryan Dahl <ry@tinyclouds.org> | 2019-10-09 17:10:09 -0400 |
commit | 151ce0266eb4de2c8fc600c81c192a5f791b6169 (patch) | |
tree | 7cb04016a1c7ee88adde83814548d7a9409dcde3 /std/strings/README.md | |
parent | a355f7c807686918734416d91b79c26c21effba9 (diff) |
Move everything into std subdir
Diffstat (limited to 'std/strings/README.md')
-rw-r--r-- | std/strings/README.md | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/std/strings/README.md b/std/strings/README.md new file mode 100644 index 000000000..8b41fee67 --- /dev/null +++ b/std/strings/README.md @@ -0,0 +1,26 @@ +# Strings + +This module provides a few basic utilities to manipulate strings. + +## Usage + +### pad + +Input string is processed to output a string with a minimal length. +If the parameter `strict` is set to true, the output string length +is equal to the `strLen` parameter. + +Basic usage: + +```ts +import { pad } from "https://deno.land/std/strings/pad.ts"; +pad("deno", 6, { char: "*", side: "left" }) // output : "**deno" +pad("deno", 6, { char: "*", side: "right"}) // output : "deno**" +pad("denosorusrex", 6 { + char: "*", + side: "left", + strict: true, + strictSide: "right", + strictChar: "..." +}) // output : "den..." +``` |