From cf83c3318fb43ebfce468477c9fb6ad64c96e440 Mon Sep 17 00:00:00 2001 From: Adam Chlipala Date: Sun, 3 Aug 2008 11:03:35 -0400 Subject: Cjrize EStrcat --- src/c/lacweb.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'src/c/lacweb.c') diff --git a/src/c/lacweb.c b/src/c/lacweb.c index c744271c..7ee6daef 100644 --- a/src/c/lacweb.c +++ b/src/c/lacweb.c @@ -505,3 +505,18 @@ void lw_Basis_htmlifyString_w(lw_context ctx, lw_Basis_string s) { } } } + +lw_Basis_string lw_Basis_strcat(lw_context ctx, lw_Basis_string s1, lw_Basis_string s2) { + int len = strlen(s1) + strlen(s2) + 1; + char *s; + + lw_check(ctx, len); + + s = ctx->heap_front; + + strcpy(s, s1); + strcat(s, s2); + ctx->heap_front += len; + + return s; +} -- cgit v1.2.3