mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-02-08 00:04:21 +01:00
🎨 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:
parent
a77e0820ad
commit
1fa674e430
6 changed files with 319 additions and 90 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue