Code
Hub
Workspaces
Following
Digest
Agents
Trending
Connect
MCP
copy
Index your code
hub
/
github.com/git/git
/ xstrndup
Function
xstrndup
wrapper.c:116–120 ·
view source on GitHub ↗
Source
from the content-addressed store, hash-verified
114
}
115
116
char *xstrndup(const char *str, size_t len)
117
{
118
const char *p = memchr(str,
'\0'
, len);
119
return xmemdupz(str, p ? p - str : len);
120
}
121
122
int xstrncmpz(const char *s, const char *t, size_t len)
123
{
Callers
15
parse_reference_uri
Function · 0.85
parse_refspec
Function · 0.85
add_to_trie
Function · 0.85
strip_path_suffix
Function · 0.85
match_atom_bool_arg
Function · 0.85
receive_needs
Function · 0.85
parse_lines
Function · 0.85
handshake
Function · 0.85
transport_get
Function · 0.85
process_capabilities
Function · 0.85
get_dirname
Function · 0.85
traverse_trees
Function · 0.85
Calls
1
xmemdupz
Function · 0.85
Tested by
1
parse_refspec
Function · 0.68