mirror of
https://github.com/SimpleMobileTools/Simple-SMS-Messenger.git
synced 2025-02-18 04:30:55 +01:00
Remove length check
This commit is contained in:
parent
91899a652c
commit
e59bc1feae
@ -64,11 +64,8 @@ fun Context.sendMessageCompat(text: String, addresses: List<String>, subId: Int?
|
|||||||
* There's not much info available on these special numbers, even the wikipedia page (https://en.wikipedia.org/wiki/Short_code)
|
* There's not much info available on these special numbers, even the wikipedia page (https://en.wikipedia.org/wiki/Short_code)
|
||||||
* contains outdated information regarding max number of digits. The exact parameters for short codes can vary by country and by carrier.
|
* contains outdated information regarding max number of digits. The exact parameters for short codes can vary by country and by carrier.
|
||||||
*
|
*
|
||||||
* This function returns true if the [address] length is less than or equal to [maxLength] and contains at least one letter.
|
* This function simply returns true if the [address] contains at least one letter.
|
||||||
*/
|
*/
|
||||||
fun isShortCodeWithLetters(address: String, maxLength: Int = 10): Boolean {
|
fun isShortCodeWithLetters(address: String): Boolean {
|
||||||
if (address.length > maxLength) {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
return address.any { it.isLetter() }
|
return address.any { it.isLetter() }
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user