hyTags
HomeHome DocumentationDocumentation

string-has-prefix

Checks if a string starts with a specified prefix.
Parameter
Type
Description
self
String
String to check
prefix
String
Prefix to search for
return
bool
True if string starts with prefix, false otherwise
Test Case:String has prefix
    <div></div>
    
    <string-new value="hello world">
    <string-has-prefix prefix="hello">
    <assert-true>
    
    👆 Try to change something!
  • Test Case:String does not have prefix
      <div></div>
      
      <string-new value="hello world">
      <string-has-prefix prefix="world">
      <assert-false>
      
      👆 Try to change something!
    • Test succeeded Test failed