diff options
| author | Wander Lairson Costa <wander@redhat.com> | 2026-03-09 16:46:23 -0300 |
|---|---|---|
| committer | Tomas Glozar <tglozar@redhat.com> | 2026-03-11 15:29:50 +0100 |
| commit | 0f4bc9d67a643a6ea8b82faf724e44648b2c322d (patch) | |
| tree | c7890385a9d8a2ddd1ad8b6cfda517ea91d50d07 /tools/perf/scripts/python | |
| parent | d847188bb92b14518a04d7542e44928a22060847 (diff) | |
rtla: Add str_has_prefix() helper function
Add a str_has_prefix() helper function that tests whether a string
starts with a given prefix. This function provides a cleaner interface
for prefix matching compared to using strncmp() with strlen() directly.
The function returns a boolean value indicating whether the string
starts with the specified prefix. This helper will be used in
subsequent changes to simplify prefix matching code throughout rtla.
Also add the missing string.h include which is needed for the strlen()
and strncmp() functions used by str_has_prefix() and the existing
strncmp_static() macro.
Signed-off-by: Wander Lairson Costa <wander@redhat.com>
Link: https://lore.kernel.org/r/20260309195040.1019085-11-wander@redhat.com
Signed-off-by: Tomas Glozar <tglozar@redhat.com>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions
