diff --git a/subjects/arrange_it/README.md b/subjects/arrange_it/README.md index 15474ed1..ac06c12e 100644 --- a/subjects/arrange_it/README.md +++ b/subjects/arrange_it/README.md @@ -4,6 +4,7 @@ Create a **function** named `arrange_phrase`, that takes a string literal, _sorts_ the words and returns it. Each word will contain a number that indicates the position of that word. +### Expected Functions ```rust pub fn arrange_phrase(phrase: &str) -> String { } diff --git a/subjects/borrow/README.md b/subjects/borrow/README.md index ba1f9e31..031983bc 100644 --- a/subjects/borrow/README.md +++ b/subjects/borrow/README.md @@ -4,6 +4,7 @@ Create a **function** named `str_len`, you'll need to complete the function signature. Your function should accept a string or a string literal, and return its length without taking ownership of the value (i.e, borrowing the value). +### Expected functions ```rust pub fn str_len(s: ) -> usize { } diff --git a/subjects/borrow_me_the_reference/README.md b/subjects/borrow_me_the_reference/README.md index 8643bfb8..e300b829 100644 --- a/subjects/borrow_me_the_reference/README.md +++ b/subjects/borrow_me_the_reference/README.md @@ -11,7 +11,6 @@ Create the following functions: - `is_correct`: which borrows a Vector of string literals representing simple addition and subtraction equations. The function should replace the correct equations with `✔`, and the wrong ones with `✘`. It should return a `usize` with the percentage of correct equations. ### Expected Functions - ```rust pub fn delete_and_backspace(s: &mut String) { } diff --git a/subjects/copy/README.md b/subjects/copy/README.md index 6e27f3c5..480d45c8 100644 --- a/subjects/copy/README.md +++ b/subjects/copy/README.md @@ -15,6 +15,7 @@ Create the following **functions**. The objective is to know how ownership works - with the `original` value. - and the `natural logarithm` of each `absolute` value. +### Expected functions ```rust pub fn nbr_function(c: i32) -> (i32, f64, f64) { } diff --git a/subjects/doubtful/README.md b/subjects/doubtful/README.md index ac3e6459..11a2d4b4 100644 --- a/subjects/doubtful/README.md +++ b/subjects/doubtful/README.md @@ -4,6 +4,7 @@ Create a function named `doubtful` which appends a question mark to every string passed to it. It must not return a value. +### Expected functions ```rust pub fn doubtful(s: /*give the correct type*/ ) { } diff --git a/subjects/name_initials/README.md b/subjects/name_initials/README.md index 4b11c529..9db6cd42 100644 --- a/subjects/name_initials/README.md +++ b/subjects/name_initials/README.md @@ -4,6 +4,7 @@ Create a **function** named `initials`. This function will receive a vector of string literals with names, and return a vector of Strings with the initials of each name. +### Expected Functions ```rust pub fn initials(names: Vec<&str>) -> Vec { } diff --git a/subjects/ownership/README.md b/subjects/ownership/README.md index ac6ae61f..77ee9a31 100644 --- a/subjects/ownership/README.md +++ b/subjects/ownership/README.md @@ -4,6 +4,7 @@ Create a **function** named `first_subword`, that takes ownership of a string and returns the first sub-word in it. It should work for `camelCase`, `PascalCase`, and `snake_case`. +### Expected functions ```rust pub fn first_subword(mut s: String) -> String { } diff --git a/subjects/string_literals/README.md b/subjects/string_literals/README.md index a1cc4b05..91330d8f 100644 --- a/subjects/string_literals/README.md +++ b/subjects/string_literals/README.md @@ -8,8 +8,9 @@ Create the following functions: - `is_ascii`: that returns `true` if all characters are within the ASCII range. - `contains`: that returns `true` if the string contains the given pattern. - `split_at`: that divides a string in two returning a tuple. -- `find`: that returns the index if the first character of a given string that matches the pattern. +- `find`: that returns the index of the first character of a given string that matches the pattern. +### Expected functions ```rust pub fn is_empty(v: &str) -> bool { } diff --git a/subjects/tic_tac_toe/README.md b/subjects/tic_tac_toe/README.md index 0eb77f83..81287f37 100644 --- a/subjects/tic_tac_toe/README.md +++ b/subjects/tic_tac_toe/README.md @@ -6,14 +6,14 @@ You must create some functions for a tic-tac-toe checker. Create a function named `tic_tac_toe`, which receives a tic-tac-toe table. It should return the appropriate string: `"player O won"`, `"player X won"` or `"Tie"`. -```rust -pub fn tic_tac_toe(table: Vec>) -> String { -} -``` Also create the following functions, which each accept a player and a table. These functions should return `true` if the player has completed one of the diagonals, rows or columns: +### Expected functions ```rust +pub fn tic_tac_toe(table: Vec>) -> String { +} + pub fn diagonals(player: &str, table: &Vec>) -> bool { } diff --git a/subjects/to_url/README.md b/subjects/to_url/README.md index ae805352..3e3f0d07 100644 --- a/subjects/to_url/README.md +++ b/subjects/to_url/README.md @@ -4,6 +4,7 @@ Create a **function** named `to_url` which takes a string and substitutes every white-space with `"%20"`. +### Expected functions ```rust pub fn to_url(s: &str) -> String { }