Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:include\linux\string.h Create Date:2022-07-28 05:34:05
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:str_has_prefix - Test if a string has a given prefix*@str: The string to test*@prefix: The string to see if @str starts with* A common way to test a prefix of a string is to do:* strncmp(str, prefix, sizeof(prefix) - 1)* But this can lead to bugs due to

Proto:static __always_inline size_t str_has_prefix(const char *str, const char *prefix)

Type:size_t

Parameter:

TypeParameterName
const char *str
const char *prefix
504  len = strlen(prefix)
505  Return If strncmp(str, prefix, len) == 0 Then len Else 0
Caller
NameDescribe
decode_state
__control_devkmsg
_braille_console_setup
parse_grepThe "str" argument may point to something like | grep xyz
trace_set_options
enable_stacktrace
f_show
synth_field_signed
synth_event_create
parse_action
parse_assignment
action_parse
parse_actions
parse_probe_vars