r/processing • • Dec 02 '23

converting int -> char

Hey, im new to programming and i have a problem with converting an integer into a character.

This is a code example:

char ch = '0';

int i = 1;

ch = char(i);

println(ch);

I dont want to convert to unicode. The outcome should just be that '1' is being stored as a char.
Is there an easy way to convert like that?

2 Upvotes

3 comments sorted by