StringExt extension
Methods
equals (String comparison )
→ bool
check string if equal to comparison, it return true or false
isApk ()
→ bool
check if string is apk
isAplhabetOnly ()
→ bool
check if string is alphabet
isAudio ()
→ bool
check if string is valid audio
example: music.mp3, muisc.wav
isBasicDateTime ()
→ bool
Unformatted date time (UTC and Iso8601)
Example: 2020-04-27 08:14:39.977, 2020-04-27T08:14:39.977, 2020-04-27 01:14:39.977Z
isBinary ()
→ bool
check if string is binary
only consist 1 & 0
isCurrency ()
→ bool
check if string is national currency
isDoc ()
→ bool
check if string is doc
isEmail ()
→ bool
check if string is valid email
isExcel ()
→ bool
check if string is excel
isHexa ()
→ bool
check if string is hexa
isHTML ()
→ bool
check if string is html
isImage ()
→ bool
check if string is valid image
example: pic.png, pic.jpg, pic.gif
isIpv4 ()
→ bool
check if string is ipv4
isIpv5 ()
→ bool
check if string is ipv5
isMd5 ()
→ bool
check if string is md5
isNumericOnly ()
→ bool
check if string is numeric
isPassportNumber ()
→ bool
check if string is passport number
isPdf ()
→ bool
check if string is pdf
isPhoneNumber ()
→ bool
is phone number valid
Must started by either, "0", "+", "+XX <X between 2 to 4 digit>", "(+XX <X between 2 to 3 digit>)"
Can add whitespace separating digit with "+" or "(+XX)"
Example: 05555555555, +555 5555555555, (+123) 5555555555, (555) 5555555555, +5555 5555555555
isPpt ()
→ bool
check if string is ppt
isSha1 ()
→ bool
check if string is sha1
isSha256 ()
→ bool
check if string is sha256
isTxt ()
→ bool
check if string is txt
isURL ()
→ bool
check if the string is a URL
isVector ()
→ bool
check if string is valid vector
example: image.svg
isVideo ()
→ bool
check if string is valid video
example: video.mp4, video.3gp
validUsername ()
→ bool
username validation
Requires minimum 3 character
Allowing "_" and "." in middle of name
string_validator_extension 0.0.2