Search This Blog

tcl: check if a string starts with a sub-string

if { [string first "abc" "abcd"] == 0 } {
    puts "yes"
} else {
    puts "no"
}

No comments:

Post a Comment