Skip to content

KFunc bpf_strcspn

v6.17

Calculate the length of the initial sub-string of s__ign which does not contain letters in reject__ign

Definition

Parameters

s__ign: The string to be searched

reject__ign: The string to search for

Returns

  • >=0 - The length of the initial substring of s__ign which does not contain letters from reject__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_strcspn(const char *s__ign, const char *reject__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