powered by
Matches a digit-only needle inside a digit-only haystack. If needle has at least min_partial digits, partial matching is allowed. Otherwise, only exact matches are considered.
needle
haystack
min_partial
whapi_match_digits(haystack, needle, min_partial = 6)
Logical (TRUE/FALSE) indicating whether a match was found.
TRUE
FALSE
String with potential digits to search in.
String with digits to search for.
Minimum number of digits required to allow partial match.
whapi_match_digits("tel: 81998765432", "987654") #> TRUE whapi_match_digits("12345", "123", min_partial = 4) #> FALSE
Run the code above in your browser using DataLab