Unbewohnte
3 years ago
4 changed files with 68 additions and 0 deletions
@ -0,0 +1,10 @@ |
|||||||
|
[package] |
||||||
|
name = "string_to_Unicode_codepoint" |
||||||
|
version = "0.1.0" |
||||||
|
authors = ["Unbewohnte <https://github.com/Unbewohte>"] |
||||||
|
edition = "2018" |
||||||
|
license = "Unlicense" |
||||||
|
|
||||||
|
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html |
||||||
|
|
||||||
|
[dependencies] |
@ -0,0 +1,24 @@ |
|||||||
|
# string_to_Unicode_codepoint |
||||||
|
## Get Unicode codepoints of provided string`s chars |
||||||
|
|
||||||
|
--- |
||||||
|
|
||||||
|
# Compilation (you`ll need [Rust](https://www.rust-lang.org/tools/install) installed) |
||||||
|
- `cd` into the project folder |
||||||
|
- `cargo build --release` |
||||||
|
|
||||||
|
Compiled binary file will be in `./target/release/` directory |
||||||
|
|
||||||
|
--- |
||||||
|
|
||||||
|
# Usage |
||||||
|
`./string_to_Unicode_codepoint SOME_TEXT_OR_ᗜˬᗜ_ȿन頿⍅獅_FANCY_CHARS_HERE` |
||||||
|
`./string_to_Unicode_codepoint "SAME AS BEFORE, BUT NOW YOU CAN ADD SPACES !"` |
||||||
|
|
||||||
|
## Examples |
||||||
|
|
||||||
|
- `./string_to_Unicode_codepoint "ᗜˬᗜ is actually 15DC 02EC 15DC !"` |
||||||
|
- `./string_to_Unicode_codepoint "You can print it by pressing ctrl+shift+u+CODEPOINT_HERE"` |
||||||
|
- `./string_to_Unicode_codepoint "ɖ࠴ɴܣͲঙȴ" > outputFile.txt` - to save the output in a file (on Unix OSs) |
||||||
|
|
||||||
|
--- |
@ -0,0 +1,24 @@ |
|||||||
|
This is free and unencumbered software released into the public domain. |
||||||
|
|
||||||
|
Anyone is free to copy, modify, publish, use, compile, sell, or |
||||||
|
distribute this software, either in source code form or as a compiled |
||||||
|
binary, for any purpose, commercial or non-commercial, and by any |
||||||
|
means. |
||||||
|
|
||||||
|
In jurisdictions that recognize copyright laws, the author or authors |
||||||
|
of this software dedicate any and all copyright interest in the |
||||||
|
software to the public domain. We make this dedication for the benefit |
||||||
|
of the public at large and to the detriment of our heirs and |
||||||
|
successors. We intend this dedication to be an overt act of |
||||||
|
relinquishment in perpetuity of all present and future rights to this |
||||||
|
software under copyright law. |
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, |
||||||
|
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF |
||||||
|
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. |
||||||
|
IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR |
||||||
|
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, |
||||||
|
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR |
||||||
|
OTHER DEALINGS IN THE SOFTWARE. |
||||||
|
|
||||||
|
For more information, please refer to <http://unlicense.org/> |
@ -0,0 +1,10 @@ |
|||||||
|
fn main() { |
||||||
|
let args: Vec<String> = std::env::args().collect(); |
||||||
|
let given_string: String = String::from(args[1].clone()); |
||||||
|
|
||||||
|
let mut counter:u128 = 0; |
||||||
|
for character in given_string.chars() { |
||||||
|
println!("{}: {} \t<---->\t {:x}", counter, character, character as u32); |
||||||
|
counter += 1; |
||||||
|
} |
||||||
|
} |
Loading…
Reference in new issue