6cfa8d42bb 2024-01-27 1: local d_3 = {}
6cfa8d42bb 2024-01-27 2: --~ 加
6cfa8d42bb 2024-01-27 3: function d_3.加始缀_基态(o1, o2)
6cfa8d42bb 2024-01-27 4: return o2 .. o1
6cfa8d42bb 2024-01-27 5: end
6cfa8d42bb 2024-01-27 6: function d_3.加终缀_基态(o1, o2)
6cfa8d42bb 2024-01-27 7: return o1 .. o2
6cfa8d42bb 2024-01-27 8: end
6cfa8d42bb 2024-01-27 9: --~ 加_分_确保
6cfa8d42bb 2024-01-27 10: --~ function d_3.加前缀_确保态(o1, o2, o3)
6cfa8d42bb 2024-01-27 11: --~ 筛文库.返全文(o1, )
6cfa8d42bb 2024-01-27 12: --~ local k1
6cfa8d42bb 2024-01-27 13: --~ k1 = d_3.删前缀(o1, o2, o3)
6cfa8d42bb 2024-01-27 14: --~ return o2 .. o1
6cfa8d42bb 2024-01-27 15: --~ end
dd620ddaa9 2024-01-27 16: --~ 减
6cfa8d42bb 2024-01-27 17: function d_3.减始缀_基态(o1, o2)
6cfa8d42bb 2024-01-27 18: if o1:startswith(o2) then
6cfa8d42bb 2024-01-27 19: return o1:sub(#o2 + 1)
6cfa8d42bb 2024-01-27 20: end
6cfa8d42bb 2024-01-27 21: end
6cfa8d42bb 2024-01-27 22: function d_3.减终缀_基态(o1, o2)
6cfa8d42bb 2024-01-27 23: if o1:endswith(o2) then
6cfa8d42bb 2024-01-27 24: return o1:sub(1, #o1 - #o2)
6cfa8d42bb 2024-01-27 25: end
6cfa8d42bb 2024-01-27 26: end
6cfa8d42bb 2024-01-27 27: return d_3