textcommonprefix

Group: text

Return length of common prefix of two text values.

Syntax

    textcommonprefix result-register lhs-string-register rhs-string-register
    

Examples

.function: main/0
    text (.name: %iota hello_joe) local "Hello Joe!"
    text (.name: %iota hello_robert) local "Hello Robert!"

    textcommonprefix (.name: %iota common_prefix) local %hello_joe local %hello_robert local
    print %common_prefix local

    izero %0 local
    return
.end