Skip to content

Latest commit

 

History

History
30 lines (22 loc) · 498 Bytes

string.md

File metadata and controls

30 lines (22 loc) · 498 Bytes

string

Table Of Contents

Split

import {Split} from 'just-types/string'
// or
import {string} from 'just-types' // and use string.Split

Split<'foo', '-'> //=> ['foo']
Split<'foo-bar-baz', '-'> //=> ['foo', 'bar', 'baz']
Split<'foo--', '-'> //=> ['foo', '', '']

Tail

import {Tail} from 'just-types/string'
// or
import {string} from 'just-types' // and use string.Tail

Tail<''> //=> ''
Tail<'a'> //=> ''
Tail<'abcd'> //=> 'bcd'