tools lib: Adopt strim() from the kernel
authorArnaldo Carvalho de Melo <acme@redhat.com>
Wed, 26 Jun 2019 14:50:16 +0000 (11:50 -0300)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Wed, 26 Jun 2019 14:50:16 +0000 (11:50 -0300)
commit45bfd0ac7bd2afa83600df9c1286a1642bb15c55
treeadf9156b80e49def0ff60a44774114fb1273f8b4
parent328584804edc950fb4608c9a38e396ac71ef22b6
tools lib: Adopt strim() from the kernel

Since we're working on moving stuff out of tools/perf/util/ to
tools/lib/, take the opportunity to adopt routines from the kernel that
are equivalent, so that tools/ code look more like the kernel.

Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: André Goddard Rosa <andre.goddard@gmail.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Link: https://lkml.kernel.org/n/tip-zqy1zdu2ok17qvi0ytk8z13c@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/include/linux/string.h
tools/lib/string.c