bpm

simple-strs

v1.0.0 Pure bnl

Tiny string helpers — pure-bnl example library.

@mamun MIT Published

Readme

simple-strs

Tiny string helpers for bnl. Pure-bnl example — no compilation, runs on every platform that runs bnl.

Install

bpm install simple-strs

Use

import "simple-strs" as s;

print(s.repeat("ab", 3));         // ababab
print(s.pad_left("7", 3, "0"));   // 007
print(s.is_blank("   "));         // true

API

  • repeat(s, n) — repeat s n times
  • pad_left(s, width, ch) — left-pad s with ch to width characters
  • is_blank(s)true if s is empty or only whitespace

Publish (for the maintainer)

bpm publish

The entire workflow for a pure-bnl library: one bnl.json, one source file, bpm publish.

MIT licensed.