We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I request to improve between It should get all the values between left and right and return an Array of them null incase there was no any values
left
right
null
/*S.prototype.between*/ function(qu1 = '"', qu2 = qu1) { var toReturn = [], f = false, str = this.s || this; for (var i = 0; i < str.length; i++) { if (str.indexOf(qu1) > -1 && !f) { f = true; str = str.slice(str.indexOf(qu1) + qu1.length); }; if (str.indexOf(qu2) > -1 && f) { var value = str.substring(0, str.indexOf(qu2)) str = str.slice(str.indexOf(qu2) + qu2.length); toReturn.push(value); f = false; } }; return toReturn.length ? toReturn : null; }
Tested and works correctly
"`Hello``World`".between("`"); //["Hello", "World"]
Please add it, Thankyou!
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I request to improve between
It should get all the values between
left
andright
and return an Array of themnull
incase there was no any valuesTested and works correctly
Please add it, Thankyou!
The text was updated successfully, but these errors were encountered: