Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/idank/explainshell
/ _estimate_text_size
Function
_estimate_text_size
explainshell/caching_store.py:41–42 ·
view source on GitHub ↗
(text: str | None)
Source
from the content-addressed store, hash-verified
39
40
41
def
_estimate_text_size(text: str | None) -> int:
42
return
len(text.encode(
"utf-8"
))
if
text
else
0
43
44
45
def
_estimate_value_size(value: object) -> int:
Callers
2
_estimate_value_size
Function · 0.85
_estimate_manpage_size
Function · 0.85
Calls
no outgoing calls
Tested by
no test coverage detected