Skip to content

Add lstrip, rstrip and trim string functions#36

Open
angusm wants to merge 1 commit into
blinkk:masterfrom
angusm:feature/trim
Open

Add lstrip, rstrip and trim string functions#36
angusm wants to merge 1 commit into
blinkk:masterfrom
angusm:feature/trim

Conversation

@angusm

@angusm angusm commented Nov 27, 2020

Copy link
Copy Markdown
Member

No description provided.

Comment thread src/string/stringf.ts
* Strip characters from the left and right side of a string
*/
static trim(value: string, characters: string[] = [' ']): string {
return stringf.lstrip(stringf.rstrip(value, characters), characters);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't this just value.trim()?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants