LoginSignup
0
0

More than 3 years have passed since last update.

Go言語 asciiコードのintから文字に変換する方法(備忘録)

Last updated at Posted at 2021-04-09

asciiコードのintから文字に変換する方法

今回はint等で保存されているasciiコードから、実際の文字に変換する方法について記載します。

//このような変換を想定しています。
97 => a

今回はstring型で値を返します。

asciiInt := 97
asciiString = string(rune(asciiInt))
//asciiString = "a"

このように変換を行うことが出来ます。

0
0
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
0
0