2 Copyright 1999-2018 ImageMagick Studio LLC, a non-profit organization
3 dedicated to making software imaging solutions freely available.
5 You may not use this file except in compliance with the License.
6 obtain a copy of the License at
8 https://www.imagemagick.org/script/license.php
10 Unless required by applicable law or agreed to in writing, software
11 distributed under the License is distributed on an "AS IS" BASIS,
12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 See the License for the specific language governing permissions and
14 limitations under the License.
16 MagickCore string methods.
18 #ifndef MAGICKCORE_STRING_H_
19 #define MAGICKCORE_STRING_H_
21 #include "MagickCore/exception.h"
23 #if defined(__cplusplus) || defined(c_plusplus)
27 typedef struct _StringInfo
43 extern MagickExport char
44 *AcquireString(const char *),
45 *CloneString(char **,const char *),
46 *ConstantString(const char *),
47 *DestroyString(char *),
48 **DestroyStringList(char **),
49 *EscapeString(const char *,const char),
50 *FileToString(const char *,const size_t,ExceptionInfo *),
51 *GetEnvironmentValue(const char *),
52 *SanitizeString(const char *),
53 *StringInfoToHexString(const StringInfo *),
54 *StringInfoToString(const StringInfo *),
55 **StringToArgv(const char *,int *),
56 *StringToken(const char *,char **),
57 **StringToList(const char *),
58 **StringToStrings(const char *,size_t *);
60 extern MagickExport const char
61 *GetStringInfoName(const StringInfo *),
62 *GetStringInfoPath(const StringInfo *);
64 extern MagickExport double
65 InterpretSiPrefixValue(const char *magick_restrict,char **magick_restrict),
66 *StringToArrayOfDoubles(const char *,ssize_t *,ExceptionInfo *);
68 extern MagickExport int
69 CompareStringInfo(const StringInfo *,const StringInfo *);
71 extern MagickExport MagickBooleanType
72 ConcatenateString(char **,const char *),
73 IsStringTrue(const char *),
74 IsStringFalse(const char *),
75 SubstituteString(char **,const char *,const char *);
77 extern MagickExport size_t
78 ConcatenateMagickString(char *,const char *,const size_t)
79 magick_attribute((__nonnull__)),
80 CopyMagickString(char *,const char *,const size_t)
81 magick_attribute((__nonnull__)),
82 GetStringInfoLength(const StringInfo *);
84 extern MagickExport ssize_t
85 FormatMagickSize(const MagickSizeType,const MagickBooleanType,const char *,
87 FormatMagickTime(const time_t,const size_t,char *);
89 extern MagickExport StringInfo
90 *AcquireStringInfo(const size_t),
91 *BlobToStringInfo(const void *,const size_t),
92 *CloneStringInfo(const StringInfo *),
93 *ConfigureFileToStringInfo(const char *),
94 *DestroyStringInfo(StringInfo *),
95 *FileToStringInfo(const char *,const size_t,ExceptionInfo *),
96 *SplitStringInfo(StringInfo *,const size_t),
97 *StringToStringInfo(const char *);
99 extern MagickExport unsigned char
100 *GetStringInfoDatum(const StringInfo *);
102 extern MagickExport void
103 ConcatenateStringInfo(StringInfo *,const StringInfo *)
104 magick_attribute((__nonnull__)),
105 PrintStringInfo(FILE *file,const char *,const StringInfo *),
106 ResetStringInfo(StringInfo *),
107 SetStringInfo(StringInfo *,const StringInfo *),
108 SetStringInfoDatum(StringInfo *,const unsigned char *),
109 SetStringInfoLength(StringInfo *,const size_t),
110 SetStringInfoName(StringInfo *,const char *),
111 SetStringInfoPath(StringInfo *,const char *),
114 #if defined(__cplusplus) || defined(c_plusplus)