Hi team,
I would like if there is a function to validate if a String comes in UpperCase format?
something like.. i.e ..
if m.isUppercase(value)
//DO SOMENTHING
end if
Thanks in advance.
you can use a regex, something like
function isUppercase(s as String) return not createObject("roRegEx", "[a-z]", "").isMatch(s) end function
@NB_ answer is correct. Please refer to the roRegex documentation for validating any type of string.
You should create a Function as per @NB_ told and pass a string in function using if condition.
function isUppercase(s as String) return CreateObject("roRegex", "[A-Z]", "").isMatch(s) end function
if isUppercase(s) then ?"UpperCase String" else ?"Not UpperCase String" end if
You can do the same for else.
We’re upgrading Roku Community to bring you a faster, more mobile-friendly experience. You may notice limited functionality or read-only access during this time. Read more here.
Planned Downtime:
Community will be unavailable for up to 24–48 hours during the upgrade window during the week of May 19th and you may notice reduced functionality.
In the meantime, for additional assistance, visit our Support Site.
We're sorry for this disruption — we’re excited to share what’s next!