ICU 51.2  51.2
urep.h
Go to the documentation of this file.
1 /*
2 ******************************************************************************
3 * Copyright (C) 1997-2010, International Business Machines
4 * Corporation and others. All Rights Reserved.
5 ******************************************************************************
6 * Date Name Description
7 * 06/23/00 aliu Creation.
8 ******************************************************************************
9 */
10 
11 #ifndef __UREP_H
12 #define __UREP_H
13 
14 #include "unicode/utypes.h"
15 
17 
18 /********************************************************************
19  * General Notes
20  ********************************************************************
21  * TODO
22  * Add usage scenario
23  * Add test code
24  * Talk about pinning
25  * Talk about "can truncate result if out of memory"
26  */
27 
28 /********************************************************************
29  * Data Structures
30  ********************************************************************/
42 typedef void* UReplaceable;
43 
51 typedef struct UReplaceableCallbacks {
52 
61  int32_t (*length)(const UReplaceable* rep);
62 
74  UChar (*charAt)(const UReplaceable* rep,
75  int32_t offset);
76 
87  UChar32 (*char32At)(const UReplaceable* rep,
88  int32_t offset);
89 
106  void (*replace)(UReplaceable* rep,
107  int32_t start,
108  int32_t limit,
109  const UChar* text,
110  int32_t textLength);
111 
125  void (*extract)(UReplaceable* rep,
126  int32_t start,
127  int32_t limit,
128  UChar* dst);
129 
146  void (*copy)(UReplaceable* rep,
147  int32_t start,
148  int32_t limit,
149  int32_t dest);
150 
152 
154 
155 #endif