Browse Source

docs(ownership): correct grammar

pull/1092/head
davhojt 2 years ago committed by Dav Hojt
parent
commit
b87e47e4da
  1. 14
      subjects/ownership/README.md

14
subjects/ownership/README.md

@ -2,15 +2,7 @@
### Instruction
- Create a **function** that takes ownership of a string and returns the first sub-word in it
- It should work for `camelCase` as well as `snake_case`
### Notions
- [ownership](https://doc.rust-lang.org/book/ch04-00-understanding-ownership.html)
### Expected Function
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`.
```rust
pub fn first_subword(mut s: String) -> String {
@ -47,3 +39,7 @@ first_subword(CamelCase) = Camel
first_subword(just) = just
$
```
### Notions
- [ownership](https://doc.rust-lang.org/book/ch04-00-understanding-ownership.html)

Loading…
Cancel
Save