MCPcopy Create free account
hub / github.com/RT-Thread/rt-thread / similar_char_num

Function similar_char_num

tools/vscpyocd.py:73–85  ·  view source on GitHub ↗
(str1, str2)

Source from the content-addressed store, hash-verified

71 vsc_tasks_file.close()
72
73def similar_char_num(str1, str2):
74 lstr1 = len(str1)
75 lstr2 = len(str2)
76 record = [[0 for i in range(lstr2+1)] for j in range(lstr1+1)]
77 similar_num = 0
78
79 for i in range(lstr1):
80 for j in range(lstr2):
81 if str1[i] == str2[j]:
82 record[i+1][j+1] = record[i][j] + 1
83 if record[i+1][j+1] > similar_num:
84 similar_num = record[i+1][j+1]
85 return similar_num
86
87def get_socName_from_rtconfig():
88 socName = None

Callers 2

get_pack_from_envFunction · 0.85
get_trgetId_from_packFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected