src/task.cpp
////////////////////////////////////////
// parse the task from the saved string
parse the task from the saved string
parse the task from the saved string
Task Task::parse()
{
    for (unsigned i = 0; i < name.size() - 1; i++){
        if (name.substr(name.size() - i - 1, 1) == ":"){
            if (name.substr(name.size() - i, 1) == "1"){
                complete = true;
            }
            name = name.substr(0, name.size() - i - 1);
            return *this;
        }
    }
    return *this;
}
Task Task :: parse ( ) { for ( unsigned i = 0 ; i < name . size ( ) - 1 ; i ++ ) { if ( name . substr ( name . size ( ) - i - 1 , 1 ) == " " ) { if ( name . substr ( name . size ( ) - i , 1 ) == " " ) { complete = true ; } name = name . substr ( 0 , name . size ( ) - i - 1 ) ; return * this ; } } return * this ; }
parse the task from the saved string
parse the task from the saved string