1
0

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 1 year has passed since last update.

【Kotlin】Byte型からuchar型に変換

Last updated at Posted at 2022-05-25

変換方法

toInt()を使用したところ、マイナスの値も含まれるようになった。
toUByte()を間に入れることで正常な値となった。

b.toUByte().toInt().toChar()

参考サイト

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

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?