-
But I don't know if there is a corresponding way to capitalize the first letter. s(
"us",
fmt("const [{}, set{setter}] = useState({})", {
i(1, "value"),
i(2, "initialValue"),
setter = l(l._1:upper(), 1)
})
), |
Beta Was this translation helpful? Give feedback.
Answered by
L3MON4D3
Aug 17, 2022
Replies: 1 comment 3 replies
-
Just a bit of playing around with string-functions: |
Beta Was this translation helpful? Give feedback.
3 replies
Answer selected by
fovj
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Just a bit of playing around with string-functions:
setter = l(l._1:sub(1,1):upper() .. l._1:sub(2,-1)))
(so extract first char, capitalize, append remaining chars)