]>
Commit | Line | Data |
---|---|---|
97c4452a | 1 | /* |
5b74111a | 2 | * Copyright (C) 1996-2018 The Squid Software Foundation and contributors |
97c4452a | 3 | * |
37be9888 AJ |
4 | * Squid software is distributed under GPLv2+ license and includes |
5 | * contributions from numerous individuals and organizations. | |
6 | * Please see the COPYING and CONTRIBUTORS files for details. | |
97c4452a FC |
7 | */ |
8 | ||
f7f3304a | 9 | #include "squid.h" |
97c4452a FC |
10 | #include "strnrchr.h" |
11 | ||
12 | const char * | |
13 | strnrchr(const char *s, size_t count, int c) | |
14 | { | |
633b9845 A |
15 | const char *rv=NULL; |
16 | const char *l=s; | |
17 | while (count > 0 && *l != 0) { | |
18 | if (*l==c) | |
19 | rv=l; | |
20 | ++l; | |
21 | --count; | |
22 | } | |
23 | return rv; | |
97c4452a | 24 | } |
f53969cc | 25 |