kebab-case Questions

3

Solved

Example strings: accuracy-is-5 accuracy-is-5-or-15 accuracy-is-5-or-15-or-20 package-is-dip-8-or-dip-4-or-dip-16 My current regexp: /^([a-z0-9\-]+)\-is\-([a-z0-9\.\-]*[a-z0-9])(?:\-or\-([a-z0-9...
Orchid asked 27/5, 2015 at 12:38

4

Solved

I'm using this function to convert CamelCase to dashed string: function camel2dashed($className) { return strtolower(preg_replace('/([^A-Z-])([A-Z])/', '$1-$2', $className)); } it kinda works b...
Idea asked 8/5, 2012 at 23:7

8

Solved

How could I convert this to PascalCase and to camelCase? var text = "welcome-to-a-New-day"; toPascalCase(text); // "WelcomeToANewDAY" toCamelCase(text); // "WelcomeToANewDA...
Latrice asked 12/2, 2019 at 13:28

4

Solved

I have a method now that will convert my camelCase strings to kebab-case, but it's broken into three calls of preg_replace(): public function camelToKebab($string, $us = "-") { // insert...
Latinist asked 9/11, 2016 at 18:54

5

Solved

Say I have a function that transforms kebab-case to camelCase: camelize("my-kebab-string") === 'myKebabString'; I'm almost there, but my code outputs the first letter with uppercase too:...
Tarshatarshish asked 19/8, 2019 at 12:11

15

Solved

This is PascalCase: SomeSymbol This is camelCase: someSymbol This is snake_case: some_symbol So my questions is whether there is a widely accepted name for this: some-symbol? It's commonly used ...

4

How can I extract hyphenated strings from this string line? ADW-CFS-WE CI SLA Def No SLANAME CI Max Outage Service I just want to extract "ADW-CFS-WE" from it but has been very unsuccess...
Finger asked 2/9, 2011 at 6:52
1

© 2022 - 2024 — McMap. All rights reserved.