About 3,680,000 results
Open links in new tab
  1. How can I convert a string to boolean in JavaScript?

    Nov 5, 2008 · 3614 Can I convert a string representing a boolean value (e.g., 'true', 'false') into an intrinsic type in JavaScript? I have a hidden form in HTML that is updated based on a user's …

  2. Best approach to converting Boolean object to string in java

    I am trying to convert boolean to string type... Boolean b = true; String str = String.valueOf(b); or Boolean b = true; String str = Boolean.toString(b); which one of above would be more efficient?

  3. Converting from a string to boolean in Python - Stack Overflow

    How do I convert a string into a boolean in Python? This attempt returns True: >>> bool ("False") True

  4. TypeScript: Convert a bool to string value - Stack Overflow

    Feb 8, 2013 · I am unable to convert a boolean to a string value in TypeScript. I have tried to use the toString() method but it does not seem to be implemented on bool.

  5. How are booleans formatted in Strings in Python? - Stack Overflow

    There are some weird tricks you can exploit to do formatting for booleans with the new style of string interpolation. It also works for f-strings. The bland, trivial case '{},{}'.format(True, False) # …

  6. php - How to Convert Boolean to String - Stack Overflow

    You use strval () or (string) to convert to string in PHP. However, that does not convert boolean into the actual spelling of "true" or "false" so you must do that by yourself.

  7. Convert a string to a Boolean in C# - Stack Overflow

    Convert.ToBoolean(string). Both are almost the same, they receive as input a string, which must be a valid string representation for a boolean and which is also case insensitive.

  8. JavaScript: Parsing a string Boolean value? - Stack Overflow

    Mar 7, 2011 · I typically expect that when someone says they want to "parse a string into a boolean" they mean that they want to map the string "false" to the boolean value false. …

  9. Como converter uma string em booleano? [fechada]

    Sep 6, 2017 · Fechada há 8 anos. No JavaScript, ao executar Boolean('false') O valor retornado é true e o esperado era false, vez que strings com qualquer conteúdo não vazio ao serem …

  10. What is the printf format specifier for bool? - Stack Overflow

    @billinkc, my question is not really about what the best way is to print bool values - it is about a concrete printf specifier. Which does not seem to exist. Another angle to a nice answer would …