# Ruby, <s>66</s> 52 (shows only which one)

    f=->{gets.gsub(/./,?1)}
    a=f[]
    b=f[]
    puts'sab'[a<=>b]

Prints `s` for same, `a` for string a, and `b` for string b.

# Ruby, <s>184</s> <s>173</s> <s>146</s> <s>143</s> 139 (also shows by how much)

    f=->{gets.gsub(/./,?1)}
    a=f[]
    b=f[]
    d=->e{(Math.log10(e.to_i)+1).floor.to_s}
    puts(a==b ? ?s:(c=a.sub(b,''))!=a ? ?a+d[c]:?b+d[b.sub(a,'')])

Sample run:

    c:\a\ruby>stringcmp
    testing123
    testing
    a3

    c:\a\ruby>stringcmp
    codegolf.SE
    code golf . stack exchange
    b15

    c:\a\ruby>stringcmp
    test
    test
    s

    c:\a\ruby>