iancoleman/strcase

CUSTOMER_ID with ToCamel or ToLowerCamel not working

Closed this issue · 1 comments

CUSTOMER_ID with ToCamel or ToLowerCamel not working
ToCamel = CUSTOMERID instead of CustomerId
ToLowerCamel = cUSTOMERID instead of customerId

nfam commented

I recommend you use strcase.ToCamel(strings.ToLower("CUSTOMER_ID")).
If you expect strcase.ToCamel("CUSTOMER_ID") == "CustomerId", then strcase.ToCamel("CustomerId") will be Customerid which is not the result we want.