86 of 100 menu

Rust Taskbook Level 9.6

Given some URL:

let url: &str = "http://test.com/dir1/dir2/dir3/page.html";

Get the name of the first folder:

"dir1"

Make a function that takes a number and returns that number in words. Let the function work with numbers up to 999. See the example:

func(123); // will bring out 'one hundred twenty three'

Given a string containing two numbers and a mathematical operation between them:

'10 + 20'

Write code that will calculate the result of the written mathematical operation.

enru