diff options
Diffstat (limited to 'std/strings')
-rw-r--r-- | std/strings/README.md | 26 | ||||
-rw-r--r-- | std/strings/decode.ts | 7 | ||||
-rw-r--r-- | std/strings/encode.ts | 7 | ||||
-rw-r--r-- | std/strings/mod.ts | 4 |
4 files changed, 0 insertions, 44 deletions
diff --git a/std/strings/README.md b/std/strings/README.md deleted file mode 100644 index 43be553b8..000000000 --- a/std/strings/README.md +++ /dev/null @@ -1,26 +0,0 @@ -# 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..." -``` diff --git a/std/strings/decode.ts b/std/strings/decode.ts deleted file mode 100644 index 2e161d7af..000000000 --- a/std/strings/decode.ts +++ /dev/null @@ -1,7 +0,0 @@ -/** A default TextDecoder instance */ -export const decoder = new TextDecoder(); - -/** Shorthand for new TextDecoder().decode() */ -export function decode(input?: Uint8Array): string { - return decoder.decode(input); -} diff --git a/std/strings/encode.ts b/std/strings/encode.ts deleted file mode 100644 index 285305613..000000000 --- a/std/strings/encode.ts +++ /dev/null @@ -1,7 +0,0 @@ -/** A default TextEncoder instance */ -export const encoder = new TextEncoder(); - -/** Shorthand for new TextEncoder().encode() */ -export function encode(input?: string): Uint8Array { - return encoder.encode(input); -} diff --git a/std/strings/mod.ts b/std/strings/mod.ts deleted file mode 100644 index def161ae0..000000000 --- a/std/strings/mod.ts +++ /dev/null @@ -1,4 +0,0 @@ -// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. - -export * from "./encode.ts"; -export * from "./decode.ts"; |