8000 Update iteration keyword replacement to have `tokens to upper camel case` by andy31415 · Pull Request #1569 · project-chip/zap · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Update iteration keyword replacement to have tokens to upper camel case #1569

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

andy31415
Copy link
Contributor

When trying latest zap after #1566 I found out that generation in matter differs from "general string utilites". Specifically for cluster "PM2.5 Concentration Measurement" the names I need are Pm25ConcentrationMeasurement (to match class names so I can use {{asUpperCamelCase name}} in templates for consistency and compatiblity) where as string utilities gives me Pm2.5ConcentrationMeasurement.

This PR updates the naming for things and:

  • moves (and shares) code from matter asCamelCase into a strings.tokensIntoCamelCase
  • adds unit tests
  • updates iterator methods

Existing string casing works differently for names containing "." in
them: matter has `Abc 1.2 Def` translated to `Abc12Def` where as
existing string utils has it as `Abc1.2Def`.

Changes:
  - move the token-based upperCamelCase into string utils
  - add unit tests
  - share the code between matter and util
Co-authored-by: Boris Zbarsky <bzbarsky@apple.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants
0