Code
Hub
Workspaces
Connect
Indexed graphs
Engine
MCP
copy
hub
/
github.com/ocsjs/ocsjs
/ nospace
Method
nospace
packages/core/src/utils/string.ts:43–45 ·
view source on GitHub ↗
删除空格,多个空格只留一个
(str?: string)
Source
from the content-addressed store, hash-verified
41
42
/** 删除空格,多个空格只留一个 */
43
static nospace(str?: string) {
44
return
str?.replace(/ +/g,
' '
) ||
''
;
45
}
46
47
/** 删除空格,多个空格只留一个 */
48
nospace() {
Callers
1
workOrExamQuestionTitleTransform
Function · 0.80
Calls
no outgoing calls
Tested by
no test coverage detected