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

breaks by using --> * <-- for check Digit #23

Open
mjohndus opened this issue Jan 12, 2022 · 0 comments
Open

breaks by using --> * <-- for check Digit #23

mjohndus opened this issue Jan 12, 2022 · 0 comments

Comments

@mjohndus
Copy link

Hallo,

/* Replace * with missing or check digit. /
->(-) while (($o = st(rr)pos($data, '
')) !== false) {
->(+) while (($o = st(r)pos($data, '*')) !== false) {

->(-) for ($i = 0; $i < 13; $i++) {
->(+) for ($i = 0; $i < ($o or 12); $i++) {

breaks by --> * <--
for ($i = 0; $i < (-->13<--); $i++) {
0 1 2 3 4 5 6 7 8 9 10 11 *
" < 13 must be < 12 "

or with while loop: use --> " < $o " <--:
if there is more than one --> * <--
search with --> st(r)pos(...) <-- for first occurrence and
use --> " < $o instead < 12 " <-- for position

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

1 participant