From f5679a6ca6afb395b7611cc99447a8787f6932f7 Mon Sep 17 00:00:00 2001 From: estlop Date: Thu, 23 Jun 2022 13:10:38 +0100 Subject: [PATCH] docs: Add readme for ascii subject --- subjects/ascii/README.md | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 subjects/ascii/README.md diff --git a/subjects/ascii/README.md b/subjects/ascii/README.md new file mode 100644 index 00000000..988d89fe --- /dev/null +++ b/subjects/ascii/README.md @@ -0,0 +1,38 @@ +## ascii + +### Instructions + +Write a function that receives a string and returns a slice with the ASCII values of its characters. + +### 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] +```