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

Utilize Phobos skipOver #10

Closed
JesseKPhillips opened this Issue May 4, 2018 · 1 comment

Comments

2 participants
@JesseKPhillips

JesseKPhillips commented May 4, 2018

if(_text.stripStartsWith("<?xml"))

You should be able to utilize: https://dlang.org/library/std/algorithm/searching/skip_over.skip_over.html
rather than the custom function.

@jmdavis jmdavis added the enhancement label Jul 10, 2018

@jmdavis

This comment has been minimized.

Show comment
Hide comment
@jmdavis

jmdavis Jul 10, 2018

Owner

It actually can't use it directly, because stripStartsWith doesn't take a range directly, and it handles incrementing the position, which skipOver doesn't do. However, stripStartsWith can be simplified to use skipOver internally.

Owner

jmdavis commented Jul 10, 2018

It actually can't use it directly, because stripStartsWith doesn't take a range directly, and it handles incrementing the position, which skipOver doesn't do. However, stripStartsWith can be simplified to use skipOver internally.

@jmdavis jmdavis added the 0.4 label Jul 10, 2018

jmdavis added a commit that referenced this issue Jul 10, 2018

Leverage skipOver in skipStartsWith.
#10

This reduces the complexity of skipStartsWith. However, at some point,
it should be further improved to strip off the wrappers around arrays of
char so that skipOver can use == when comparing when the type being
parsed is an array of char.

@jmdavis jmdavis closed this Jul 10, 2018

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