blob: b314264f56335eb8502afb3689261291dd9ff04b [file] [log] [blame]
Bernhard Reutner-Fischer17282292008-05-28 14:19:27 +00001/* vi: set sw=4 ts=4: */
2/*
3 * Utility routines.
4 *
5 * Copyright (C) 2008 Bernhard Fischer
6 *
7 * Licensed under GPLv2 or later, see file License in this tarball for details.
8 */
9
10#include "libbb.h"
11
12/* reverse strstr() */
13char* strrstr(const char *haystack, const char *needle)
14{
15 char *tmp = strrchr(haystack, *needle);
16 if (tmp == NULL || strcmp(tmp, needle) != 0)
17 return NULL;
18 return tmp;
19}
20