Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: Add readme for ascii subject #1287

Merged
merged 2 commits into from
Jun 28, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 38 additions & 0 deletions subjects/ascii/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
## ascii

### Instructions

Write a function that receives a string and returns a slice with the ASCII values of its characters.
eslopfer marked this conversation as resolved.
Show resolved Hide resolved

### Expected function

```go
func Ascii(str string) []byte {

}
```

### Usage

Here is a possible program to test your function:

```go
package main

import (
"piscine"
"fmt"
)

func main() {
l := piscine.Ascii("Hello")
fmt.Println(l)
}
```

And its output:

```console
$ go run .
[104 101 108 108 111]
```