tal/str: always create strings which have tal_count() == strlen() + 1.
authorRusty Russell <rusty@rustcorp.com.au>
Fri, 27 Jul 2018 06:25:50 +0000 (15:55 +0930)
committerRusty Russell <rusty@rustcorp.com.au>
Fri, 27 Jul 2018 06:25:50 +0000 (15:55 +0930)
commit55d814230f7fb628bb5303cd53498209c7928040
treeccc53a0b5e0535f1a3d19ef83d34c5cdc58d2578
parent1651e25ee7cf7a24692e7ffa0c6fc9a47218eb6d
tal/str: always create strings which have tal_count() == strlen() + 1.

This is least-surprise, but also means callers can sometimes do faster
string handling by avoiding strstr().

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
ccan/tal/str/_info
ccan/tal/str/str.c
ccan/tal/str/str.h
ccan/tal/str/test/run-fmt-terminate.c
ccan/tal/str/test/run-string.c
ccan/tal/str/test/run-strndup.c
ccan/tal/str/test/run-strreg.c
ccan/tal/str/test/run.c