Question

StringCaseChanger test for sting case first

  • 23 September 2021
  • 3 replies
  • 9 views

Badge

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

Badge +2

@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

Badge

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.

Userlevel 4

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.

Reply