QStringList parse(const QString &string, char split = ',')

Split the provided string using the provided split character. Lexical scoping of (), [], \<>, and {} is respected.

  • function definition:

    static QStringList parse(const QString &string, char split = ',');
    
  • parameters:

    Parameter Type Description
    string const QString & String to be split
    split char (Optional) The character to split the string on. Default is ','
  • output: (QStringList) Returns a list of the split strings

  • example:
    Object::parse("Transform1(p1=v1,p2=v2),Transform2(p1=v3,p2=v4)"); // returns ["Transform1(p1=v1,p2=v2)", "Transform2(p1=v3,p2=v4)"]