100-days-of-rust/Week-08/Day-56_Convert-To-Hex
2024-09-19 08:42:30 +02:00
..
day56 Wrote program for Day 56 2024-09-19 08:42:30 +02:00
README.md Add files via upload 2023-03-23 21:14:34 -04:00

Convert to Hex

Create a function that takes a strings characters as ASCII and returns each characters hexadecimal value as a string.

Examples

toHex("hello world") ➞ "68 65 6c 6c 6f 20 77 6f 72 6c 64"

toHex("Big Boi") ➞ "42 69 67 20 42 6f 69"

toHex("Marty Poppinson") ➞ "4d 61 72 74 79 20 50 6f 70 70 69 6e 73 6f 6e"

Notes

  • Each byte must be seperated by a space.
  • All alpha hex characters must be lowercase.