MCPcopy
hub / github.com/ZToolsCenter/ZTools / getNextPrefix

Method getNextPrefix

src/main/api/shared/database.ts:436–440  ·  view source on GitHub ↗

* 计算字典序的下一个前缀(用于精确的范围查询) * 例如:prefix = "PLUGIN/test/" -> end = "PLUGIN/test0"

(prefix: string)

Source from the content-addressed store, hash-verified

434 * 例如:prefix = "PLUGIN/test/" -> end = "PLUGIN/test0"
435 */
436 private getNextPrefix(prefix: string): string {
437 const lastChar = prefix[prefix.length - 1]
438 const nextChar = String.fromCharCode(lastChar.charCodeAt(0) + 1)
439 return prefix.slice(0, -1) + nextChar
440 }
441
442 /**
443 * 获取所有插件的数据统计(供内部调用)

Callers 3

_getPluginDataStatsMethod · 0.95
_getPluginDocKeysMethod · 0.95
_clearPluginDataMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected