MCPcopy
hub / github.com/ocsjs/ocsjs / nowrap

Method nowrap

packages/core/src/utils/string.ts:29–31  ·  view source on GitHub ↗

* 删除换行符 * @param replace_str 替代的字符串

(str: string, replace_str: string)

Source from the content-addressed store, hash-verified

27 * @param replace_str 替代的字符串
28 */
29 static nowrap(str: string, replace_str: string) {
30 return str?.replace(/\n/g, replace_str) || '';
31 }
32
33 /**
34 * 删除换行符

Callers 3

resolveMultipleFunction · 0.80
resolveSingleFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected