Aleksey Kuleshov
eb2b2e2647
clarify strim function description
...
Signed-off-by: Aleksey Kuleshov <rndfax@yandex.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-08-22 07:47:30 +02:00
Sascha Hauer
22b8e9415d
string: Introduce strtobool
...
We have at least two places which convert a string to a boolean type,
so create a common function for this. strtobool treats
- any positive (nonzero) number as true
- "0" as false
- "true" (case insensitive) as true
- "false" (case insensitive) as false
Every other value results in an error and the input *val is not
modified. The caller is expected to initialize *val with the correct
default before calling strtobool.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-04-29 11:29:25 +02:00
Sascha Hauer
88ffe72278
string.c: Fix include
...
string.c needs string.h, otherwise we get:
lib/string.c:730: warning: no previous prototype for 'memdup'
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-03-29 06:49:47 +01:00
Sascha Hauer
54f55d79d9
string: Add (x)memdup
...
It's a common task to duplicate some memory. Add (x)memdup functions.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-11-27 10:42:54 +01:00
Sascha Hauer
b445152396
string: introduce memchr_inv
...
Directly taken from Linux Kernel.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-07-22 16:13:58 +02:00
Sebastian Hesselbarth
196be5c776
lib: string: import case-insensitive string compare
...
This imports strnicmp, strcasecmp, and strncasecmp from Linux to barebox.
Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
2013-06-20 17:17:32 +02:00
Eric Bénard
7baead578d
string: add strim for ONFI code
...
Signed-off-by: Eric Bénard <eric@eukrea.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-07-05 20:58:54 +02:00
Sascha Hauer
d3cb611fc6
string: remove unused bcopy function
...
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-04-05 08:47:49 +02:00
Jean-Christophe PLAGNIOL-VILLARD
e0953c5db2
string: add strlcpy support
...
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Cc: Andrea GALLO <andrea.gallo@stericsson.com>
Cc: Gael SALLES <gael.salles@stericsson.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2010-08-06 19:09:38 +02:00
Juergen Beisert
765cb0028d
Fix some exported names
...
Unsure if this is the/a correct fix, but without it, my build fails.
Signed-off-by: Juergen Beisert <jbe@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-12-11 10:37:11 +01:00
Sascha Hauer
bcb049a702
string: add typechecking for strchr, strrchr, strstr
...
These functions offered an excellent possibility to bypass compiler
type checking.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2008-08-20 17:46:54 +02:00
Marc Kleine-Budde
f94dae59d7
improved codingstyle
...
This patch improved the codingstyle
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2007-11-29 10:22:49 +01:00
Sascha Hauer
17c3e64578
export functions
2007-10-04 12:37:06 +02:00
Sascha Hauer
4a660c0877
svn_rev_639
2007-07-05 18:02:12 +02:00