hyTags
HomeHome DocumentationDocumentation

string-new

Creates a new string from an optional value, using an empty string if nil.
Parameter
Type
Description
value
String?
Value to convert to string (or nil for empty string)
return
string
String value or empty string if nil
Test Case:Create string with value
    <div></div>
    
    <string-new value="hello">
    <assert-equal value="hello" type="string">
    
    👆 Try to change something!
  • Test Case:Create empty string
      <div></div>
      
      <string-new>
      <assert-equal value type="string">
      
      👆 Try to change something!
    • Test succeeded Test failed