Mercurial > hg > MonetDB-extend
comparison reverse/reverse.c @ 33:a8ffdbc388ce
Ported to Jun2020 branch.
author | Sjoerd Mullender <sjoerd@acm.org> |
---|---|
date | Tue, 09 Jun 2020 10:30:35 +0200 (2020-06-09) |
parents | e925d55b369b |
children | e5d2d0c9b7b3 |
comparison
equal
deleted
inserted
replaced
32:25cd8af6fa82 | 33:a8ffdbc388ce |
---|---|
19 * src is a UTF-8-encoded string of length exactly len bytes */ | 19 * src is a UTF-8-encoded string of length exactly len bytes */ |
20 static void | 20 static void |
21 do_reverse(char *dst, const char *src, size_t len) | 21 do_reverse(char *dst, const char *src, size_t len) |
22 { | 22 { |
23 dst[len] = 0; | 23 dst[len] = 0; |
24 if (GDK_STRNIL(src)) { | 24 if (strNil(src)) { |
25 /* special case for nil:str */ | 25 /* special case for nil:str */ |
26 assert(len == strlen(str_nil)); | 26 assert(len == strlen(str_nil)); |
27 strcpy(dst, str_nil); | 27 strcpy(dst, str_nil); |
28 return; | 28 return; |
29 } | 29 } |