Convert from snake case to camel/pascal case and vice versa.
Sie verfolgen jetzt diese Einreichung
- Aktualisierungen können Sie in Ihrem Feed verfolgter Inhalte sehen.
- Je nach Ihren Kommunikationseinstellungen können Sie auch E-Mails erhalten.
Convert Naming Convention
Convert from snake case to camel/pascal case and vice versa.
Snake Case to Camel/Pascal Case
Syntax:
- [camelCase, PascalCase] = snake2camel(snake_case)
- snake_case = camel2snake(camelCase)
Input Arguments:
- snake_case - Input text in snake case. [string array | character vector | cell array of character vectors]
- camelCase - Input text in camel case. [string array | character vector | cell array of character vectors]
Examples:
% Example 1: Convert from snake case to camel/pascal case
snake_case = ["num_files", "variable_name", "some_function"];
[camelCase, PascalCase] = snake2camel(snake_case);
% Example 2: Convert from camel case to snake case
camelCase = ["nFiles", "VariableName", "someFunction"];
snake_case = camel2snake(camelCase);Author:
- Moses Yoo, (juyoung.m.yoo at gmail dot com)
Special Thanks
Special thanks to Stephen for showing and explaining the much simpler regular expression version!
Zitieren als
Moses (2026). Convert Naming Convention (https://github.com/NewGuy012/convert-naming-convention/releases/tag/4.1), GitHub. Abgerufen .
Allgemeine Informationen
- Version 4.1.0.0 (56,8 KB)
-
Lizenz auf GitHub anzeigen
Kompatibilität der MATLAB-Version
- Kompatibel mit allen Versionen
Plattform-Kompatibilität
- Windows
- macOS
- Linux
| Version | Veröffentlicht | Versionshinweise | Action |
|---|---|---|---|
| 4.1.0.0 | See release notes for this release on GitHub: https://github.com/NewGuy012/convert-naming-convention/releases/tag/4.1 |
||
| 3.1 | See release notes for this release on GitHub: https://github.com/NewGuy012/convert-naming-convention/releases/tag/3.1 |
||
| 3.0 | See release notes for this release on GitHub: https://github.com/NewGuy012/convert-naming-convention/releases/tag/3.0 |
||
| 2.1 | See release notes for this release on GitHub: https://github.com/NewGuy012/convert-naming-convention/releases/tag/2.1 |
||
| 2.0 | See release notes for this release on GitHub: https://github.com/NewGuy012/convert-naming-convention/releases/tag/2.0 |
||
| 1.2.0.0 | See release notes for this release on GitHub: https://github.com/NewGuy012/convert-naming-convention/releases/tag/1.2 |
||
| 1.1 | Update description examples. |
||
| 1.0 |

