hyTags
HomeHome DocumentationDocumentation

bool-from-string

Converts a string to a boolean value.
Parameter
Type
Description
string
String
String to convert ("true" or "false")
return
bool
Boolean value or `nil` if string is invalid
Test Case:Parse true string
    <div></div>
    
    <bool-from-string string="true">
    <assert-true>
    
    👆 Try to change something!
  • Test Case:Parse false string
      <div></div>
      
      <bool-from-string string="false">
      <assert-false>
      
      👆 Try to change something!
    • Test succeeded Test failed