blob: b5385e956929da4cb65f4365bafe54f245b7d8ba [file] [log] [blame]
Denys Vlasenko198b02f2013-12-31 23:22:36 +01001/* vi: set sw=4 ts=4: */
2/*
3 * Utility routines.
4 *
5 * Copyright (C) 2008 Denys Vlasenko
6 *
7 * Licensed under GPLv2, see file LICENSE in this source tree.
8 */
Denys Vlasenko198b02f2013-12-31 23:22:36 +01009//kbuild:lib-y += nuke_str.o
10
11#include "libbb.h"
12
13void FAST_FUNC nuke_str(char *str)
14{
Denys Vlasenko4c201c02018-07-17 15:04:17 +020015 if (str) {
Denys Vlasenko198b02f2013-12-31 23:22:36 +010016 while (*str)
17 *str++ = 0;
18 /* or: memset(str, 0, strlen(str)); - not as small as above */
19 }
20}