Skip to main content
Question

StringCaseChanger test for sting case first

  • September 23, 2021
  • 3 replies
  • 42 views

dos_gis
Contributor
Forum|alt.badge.img+3

Hi, I'm using StringCaseChanger but I'd first like to test if a attribute string is all caps. I'm using tester with Regex [A-Z\\s]+ and Case Sensitive mode but I'm not getting the expected results. Any ideas on how I can tester for attributes with all caps? These are paragraphs that might contain numbers and other symbols as well.

3 replies

Forum|alt.badge.img+2
  • September 23, 2021

@dos_gis​ Do you have a small example of a couple of strings that you're trying to test? If the string is already uppercase, then StringCaseChanger should just run it's course - assuming you're trying to make everything uppercase


dos_gis
Contributor
Forum|alt.badge.img+3
  • Author
  • Contributor
  • September 23, 2021

Hi Mark, The data is a mix of uppercase and sentence case. I'd like to test for uppercase then use StringCaseChanger on that selection only - changing uppercase to title case.


david_r
Celebrity
  • September 24, 2021

The most robust way to do it is perhaps to create a copy of the original string and run it through the StringCaseChanger set to UPPER case. Then compare the original and the copy of the string; if identical, it was already all upper case.


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings