Back to Type Challenges

README.Zh CN

questions/00114-hard-camelcase/README.zh-CN.md

latest1.9 KB
Original Source
<!--info-header-start--><h1>CamelCase </h1><blockquote><p>by Anthony Fu <a href="https://github.com/antfu" target="_blank">@antfu</a></p></blockquote><p><a href="https://tsch.js.org/114/play/zh-CN" target="_blank"></a> &nbsp;&nbsp;&nbsp;<a href="./README.md" target="_blank"></a> <a href="./README.ja.md" target="_blank"></a> </p><!--info-header-end-->

实现 CamelCase<T> ,将 snake_case 类型的表示的字符串转换为 camelCase 的表示方式。

例如

ts
type camelCase1 = CamelCase<"hello_world_with_types"> // 预期为 'helloWorldWithTypes'
type camelCase2 = CamelCase<"HELLO_WORLD_WITH_TYPES"> // 期望与前一个相同
<!--info-footer-start-->

<a href="../../README.zh-CN.md" target="_blank"></a> <a href="https://tsch.js.org/114/answer/zh-CN" target="_blank"></a> <a href="https://tsch.js.org/114/solutions" target="_blank"></a> <hr><h3>相关挑战</h3><a href="https://github.com/type-challenges/type-challenges/blob/main/questions/00612-medium-kebabcase/README.md" target="_blank"></a> <!--info-footer-end-->