OtpExtractor

Extracts OTP-like codes from free-form text such as SMS bodies or clipboard content.

Functions

Link copied to clipboard
fun extract(text: String, length: Int, allowedChars: OtpAllowedChars = OtpAllowedChars.DigitsOnly): String?

Returns an OTP of length when a confident match is found, otherwise null.