diff options
Diffstat (limited to 'polyp/util.c')
-rw-r--r-- | polyp/util.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/polyp/util.c b/polyp/util.c index 166a9a45..fa33ffff 100644 --- a/polyp/util.c +++ b/polyp/util.c @@ -518,3 +518,10 @@ int pa_lock_file(int fd, int b) { return 0; } + +char* pa_strip_nl(char *s) { + assert(s); + + s[strcspn(s, "\r\n")] = 0; + return s; +} |