Code
Hub
Workspaces
Connect
Indexed graphs
Engine
MCP
copy
Index your code
hub
/
github.com/openai/plugins
/ _javascript_string_length
Function
_javascript_string_length
plugins/codex-security/scripts/workbench_db.py:674–675 ·
view source on GitHub ↗
(value: str)
Source
from the content-addressed store, hash-verified
672
673
674
def
_javascript_string_length(value: str) -> int:
675
return
len(value.encode(
"utf-16-le"
, errors=
"surrogatepass"
)) // 2
676
677
678
def
_escape_json_surrogates(value: str) -> str:
Callers
2
_bounded_preflight_text
Function · 0.85
_normalize_preflight_patch
Function · 0.85
Calls
no outgoing calls
Tested by
no test coverage detected