carta
sysfs_streq(9)

sysfs_streq9

Return true if strings are equal, modulo trailing newline

Usage

bool sysfs_streq(const char * s1, const char * s2);

Arguments

s1

one string

s2

another string

Overview

This routine returns true iff two strings are equal, treating both NUL and newline-then-NUL as equivalent string terminations. It's geared for use with sysfs input strings, which generally terminate with newlines but are compared against values without newlines.

History

  • Debian 9 (Stretch): the text shown here
  • Debian 8 (Jessie)
  • Debian 7 (Wheezy)
  • Debian 6.0 (Squeeze)
  • Debian 5.0 (Lenny)

From linux-manual-4.9 4.9.228-1 in Debian 9 (Stretch). Parsed by carta from the page's man source.