1 /*===-- clang-c/CXString.h - C Index strings  --------------------*- C -*-===*\
2 |*                                                                            *|
3 |* Part of the LLVM Project, under the Apache License v2.0 with LLVM          *|
4 |* Exceptions.                                                                *|
5 |* See https://llvm.org/LICENSE.txt for license information.                  *|
6 |* SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception                    *|
7 |*                                                                            *|
8 |*===----------------------------------------------------------------------===*|
9 |*                                                                            *|
10 |* This header provides the interface to C Index strings.                     *|
11 |*                                                                            *|
12 \*===----------------------------------------------------------------------===*/
13 
14 module clang.c.CXString;
15 
16 extern (C):
17 
18 /**
19  * \defgroup CINDEX_STRING String manipulation routines
20  * \ingroup CINDEX
21  *
22  * @{
23  */
24 
25 /**
26  * A character string.
27  *
28  * The \c CXString type is used to return strings from the interface when
29  * the ownership of that string might differ from one call to the next.
30  * Use \c clang_getCString() to retrieve the string data and, once finished
31  * with the string data, call \c clang_disposeString() to free the string.
32  */
33 struct CXString
34 {
35     const(void)* data;
36     uint private_flags;
37 }
38 
39 struct CXStringSet
40 {
41     CXString* Strings;
42     uint Count;
43 }
44 
45 /**
46  * Retrieve the character data associated with the given string.
47  */
48 const(char)* clang_getCString(CXString string);
49 
50 /**
51  * Free the given string.
52  */
53 void clang_disposeString(CXString string);
54 
55 /**
56  * Free the given string set.
57  */
58 void clang_disposeStringSet(CXStringSet* set);
59 
60 /**
61  * @}
62  */
63