Skip to content

KFunc bpf_strspn

v6.17

Calculate the length of the initial sub-string of s__ign which only contains letters in accept__ign

Definition

Parameters

s__ign: The string to be searched

accept__ign: The string to search for

Return

  • >=0 - The length of the initial substring of s__ign which only contains letters from accept__ign
  • -EFAULT - Cannot read one of the strings
  • -E2BIG - One of the strings is too large
  • -ERANGE - One of the strings is outside of kernel address space

Signature

int bpf_strspn(const char *s__ign, const char *accept__ign)

Usage

Docs could be improved

This part of the docs is incomplete, contributions are very welcome

Program types

The following program types can make use of this kfunc:

Example

Docs could be improved

This part of the docs is incomplete, contributions are very welcome