Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor string split #14

Merged
merged 4 commits into from
Aug 14, 2023
Merged

Refactor string split #14

merged 4 commits into from
Aug 14, 2023

Conversation

aegenet
Copy link
Owner

@aegenet aegenet commented Aug 14, 2023

import { StringSplit } from '@aegenet/belt-string-split';

const stringSplit = new StringSplit({
  separator: ' ',
  ignoreTags: {
    '"': '"',
  },
});

stringSplit.split('Hello Brian "Something Else"');
//  ['Hello', 'Brian', '"Something Else"']

const stringSplit = new StringSplit({
  separator: ' ',
  ignoreTags: {
    '(': ')',
  },
});

stringSplit.split('Hello Brian (Something Else)');
// ['Hello', 'Brian', '(Something Else)']
stringSplit.split('Hello Brian (Something Else (or something))');
// ['Hello', 'Brian', '(Something Else (or something))']

@aegenet aegenet added the enhancement New feature or request label Aug 14, 2023
@aegenet aegenet self-assigned this Aug 14, 2023
@aegenet aegenet merged commit 6e961fc into master Aug 14, 2023
4 checks passed
@aegenet aegenet deleted the refactor-string-split branch August 14, 2023 18:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant