2
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

競プロで使うための GO 入門 ~ASCII変換~

Last updated at Posted at 2020-07-22

Index

ASCII変換

package main

import (
	"fmt"
)

func main() {

    // 文字からASCII
    s := "ABC"
    fmt.Println(s[0], s[1], s[2]) // ->64 65 66

	// ASCII から文字
    s = string(97) + string(98) + string(0x63)
    fmt.Println(s) // ->abc
}
2
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?