Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/alibaba/graph-learn
/ SafeFirstChar
Function
SafeFirstChar
graphlearn/src/common/string/numeric.cc:82–87 ·
view source on GitHub ↗
Source
from the content-addressed store, hash-verified
80
}
81
82
char SafeFirstChar(LiteString str) {
83
if (str.empty()) {
84
return
'\0'
;
85
}
86
return str[0];
87
}
88
89
void SkipSpaces(LiteString* str) {
90
while (isspace(SafeFirstChar(*str))) {
Callers
3
SkipSpaces
Function · 0.85
SafeStringTo32
Function · 0.85
SafeStringTo64
Function · 0.85
Calls
1
empty
Method · 0.45
Tested by
no test coverage detected