EPICS Base  7.0.6.1
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
epicsString.h
1 /*************************************************************************\
2 * Copyright (c) 2009 Helmholtz-Zentrum Berlin fuer Materialien und Energie.
3 * Copyright (c) 2009 UChicago Argonne LLC, as Operator of Argonne
4 * National Laboratory.
5 * Copyright (c) 2002 The Regents of the University of California, as
6 * Operator of Los Alamos National Laboratory.
7 * SPDX-License-Identifier: EPICS
8 * EPICS BASE is distributed subject to a Software License Agreement found
9 * in file LICENSE that is included with this distribution.
10 \*************************************************************************/
11 
12 /* Authors: Jun-ichi Odagiri, Marty Kraimer, Eric Norum,
13  * Mark Rivers, Andrew Johnson, Ralph Lange
14  */
15 
16 #ifndef INC_epicsString_H
17 #define INC_epicsString_H
18 
19 #include <stdio.h>
20 #include "epicsTypes.h"
21 #include "libComAPI.h"
22 
23 #ifdef __cplusplus
24 extern "C" {
25 #endif
26 
27 LIBCOM_API int epicsStrnRawFromEscaped(char *outbuf, size_t outsize,
28  const char *inbuf, size_t inlen);
29 LIBCOM_API int epicsStrnEscapedFromRaw(char *outbuf, size_t outsize,
30  const char *inbuf, size_t inlen);
31 LIBCOM_API size_t epicsStrnEscapedFromRawSize(const char *buf, size_t len);
32 LIBCOM_API int epicsStrCaseCmp(const char *s1, const char *s2);
33 LIBCOM_API int epicsStrnCaseCmp(const char *s1, const char *s2, size_t len);
34 LIBCOM_API char * epicsStrDup(const char *s);
35 LIBCOM_API char * epicsStrnDup(const char *s, size_t len);
36 LIBCOM_API int epicsStrPrintEscaped(FILE *fp, const char *s, size_t n);
37 #define epicsStrSnPrintEscaped epicsStrnEscapedFromRaw
38 LIBCOM_API size_t epicsStrnLen(const char *s, size_t maxlen);
39 
50 LIBCOM_API int epicsStrGlobMatch(const char *str, const char *pattern);
51 
61 LIBCOM_API int epicsStrnGlobMatch(const char *str, size_t len, const char *pattern);
62 
63 LIBCOM_API char * epicsStrtok_r(char *s, const char *delim, char **lasts);
64 LIBCOM_API unsigned int epicsStrHash(const char *str, unsigned int seed);
65 LIBCOM_API unsigned int epicsMemHash(const char *str, size_t length,
66  unsigned int seed);
76 LIBCOM_API double epicsStrSimilarity(const char *A, const char *B);
77 
78 /* dbTranslateEscape is deprecated, use epicsStrnRawFromEscaped instead */
79 LIBCOM_API int dbTranslateEscape(char *s, const char *ct);
80 
81 #ifdef __cplusplus
82 }
83 #endif
84 
85 #endif /* INC_epicsString_H */
The core data types used by epics.