Screaming Snake Case and PascalCase

st.utils.screaming_snake_case("am not")

returns

AM NOT

should it not return

AM_NOT

Similarly

st.utils.pascal_case("am not")

returns

Am Not

should it not return

AmNot

1 Like

Thank you for sharing your results. I’ll look into it and create a report if necessary.
I’ll keep you updated.

Following up on this case, the one I also had issues with is this one, pascal_case works fine for me:

  local util = require "st.utils"


  local snakeCase = util.screaming_snake_case("I am not")
  print("snakeCase   "..snakeCase)
  local pascal = util.pascal_case("I am not")
  print("pascal   "..pascal)
  local camel = util.camel_case("I am not")
  print("camel   "..camel) 

So, I’ll report that issue. Please, check again the pascal_case, are you importing correctly the st.utils?

You are correct, PascalCase is working correctly. I just looked at the wrong debug line.