🎨 Supports cleaning up unreferenced databases https://github.com/siyuan-note/siyuan/issues/11569

Signed-off-by: Daniel <845765@qq.com>
This commit is contained in:
Daniel 2026-01-27 22:58:56 +08:00
parent a77e0820ad
commit 1fa674e430
No known key found for this signature in database
GPG key ID: 86211BA83DF03017
6 changed files with 319 additions and 90 deletions

View file

@ -207,6 +207,15 @@ func ContainsSubStr(s string, subStrs []string) bool {
return false
}
func GetContainsSubStrs(s string, subStrs []string) (ret []string) {
for _, v := range subStrs {
if strings.Contains(s, v) {
ret = append(ret, v)
}
}
return
}
func ReplaceStr(strs []string, old, new string) (ret []string, changed bool) {
if old == new {
return strs, false