diff options
Diffstat (limited to 'mbbsd/stuff.c')
-rw-r--r-- | mbbsd/stuff.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/mbbsd/stuff.c b/mbbsd/stuff.c index 4002f39e..8f6f65d5 100644 --- a/mbbsd/stuff.c +++ b/mbbsd/stuff.c @@ -152,6 +152,17 @@ trim(char *buf) } } +/* remove last '\n' */ +void chomp(char *src) +{ + while(*src){ + if (*src == '\n') + *src = 0; + else + src++; + } +} + /* ----------------------------------------------------- */ /* 字串檢查函數:英文、數字、檔名、E-mail address */ /* ----------------------------------------------------- */ |