This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// define a constant string with the value "hello world" | |
const HELLO_WORLD: &str = "Hello, World!"; | |
fn main() { | |
// sanitize HELLO_WORLD | |
let camel_cased: String = to_camelcase(&HELLO_WORLD.to_lowercase()); | |
println!("{}", camel_cased); // helloWorld | |
let dash_delimited = camelcase_to_delimiter_seperated(&camel_cased, "-"); | |
println!("{}", dash_delimited); // hello-world | |
let recamel_cased = to_camelcase(&dash_delimited); | |
println!("{}", recamel_cased); // helloWorld |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### Keybase proof | |
I hereby claim: | |
* I am magicink on github. | |
* I am magicink (https://keybase.io/magicink) on keybase. | |
* I have a public key whose fingerprint is 17A3 218E 107D 159C 43C6 C6F0 9F5D 640A 8F6E E3D4 | |
To claim this, I am signing this object: |