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

between bug #215

Open
lukluk opened this issue Feb 23, 2018 · 3 comments
Open

between bug #215

lukluk opened this issue Feb 23, 2018 · 3 comments

Comments

@lukluk
Copy link

lukluk commented Feb 23, 2018

var S = require('string'); let mynext = S('Money ] Family ').between('[', ']').s console.log("I choose ", mynext)
it should be empty string not "money"

@LeeeRoux
Copy link

LeeeRoux commented Oct 11, 2018

You may would like to add this line to the between function.
Incase you want it as an empty string

 if (startPos == -1 || endPos == -1) return new this.constructor('');

The main function does not check if one of the quotes were not exist..

@lukluk
Copy link
Author

lukluk commented Oct 18, 2018

published PR
#223

@marcus-hiles
Copy link

@lukluk interesting find

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

No branches or pull requests

3 participants