2001-03-17 04:17:14 +05:30
|
|
|
/* vi: set sw=4 ts=4: */
|
|
|
|
/*
|
|
|
|
* Utility routines.
|
|
|
|
*
|
2004-03-15 13:59:22 +05:30
|
|
|
* Copyright (C) many different people.
|
2003-07-15 02:51:08 +05:30
|
|
|
* If you wrote this, please acknowledge your work.
|
2001-03-17 04:17:14 +05:30
|
|
|
*
|
2006-05-20 00:59:19 +05:30
|
|
|
* Licensed under GPLv2 or later, see file LICENSE in this tarball for details.
|
2001-03-17 04:17:14 +05:30
|
|
|
*/
|
|
|
|
|
|
|
|
#include "libbb.h"
|
|
|
|
|
|
|
|
void chomp(char *s)
|
|
|
|
{
|
2002-01-03 00:21:23 +05:30
|
|
|
char *lc = last_char_is(s, '\n');
|
2004-03-15 13:59:22 +05:30
|
|
|
|
2006-11-11 04:55:53 +05:30
|
|
|
if (lc)
|
2002-01-03 00:21:23 +05:30
|
|
|
*lc = 0;
|
2001-03-17 04:17:14 +05:30
|
|
|
}
|