how to convert a string to a bool January 20, 2023 by Tarik Quite simple indeed: bool b = str == "1";