File: wstring.h

package info (click to toggle)
ruby-unicode 0.4.4-2
  • links: PTS, VCS
  • area: main
  • in suites: buster, jessie, jessie-kfreebsd, sid, stretch
  • size: 1,776 kB
  • ctags: 129
  • sloc: ansic: 1,612; ruby: 401; makefile: 2
file content (43 lines) | stat: -rw-r--r-- 1,020 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
/*
 * Simple wide string library
 * Version 0.1
 * 1999 by yoshidam
 */

#ifndef _WSTRING_H
#define _WSTRING_H

#include "ustring.h"

#ifdef __cplusplus
extern "C" {
#endif

#define WSTR_INITIAL_STRING_LEN 1024
#define WSTR_STRING_EXTEND_LEN 1024

typedef struct _WString {
  int* str;
  int len;
  int size;
} WString;

WString* WStr_alloc(WString* str);
WString* WStr_allocWithUTF8(WString* s, const char* u);
WString* WStr_allocWithUTF8L(WString* s, const char* u, int len);
WString* WStr_enlarge(WString* str, int size);
void WStr_free(WString* str);
int WStr_addWChars(WString* s, const int* a, int len);
int WStr_addWChar(WString* s, int a);
int WStr_pushWString(WString* s, const WString* add);
int WStr_addWChar2(WString* s, int a1, int a2);
int WStr_addWChar3(WString* s, int a1, int a2, int a3);
UString* WStr_convertIntoUString(WString* wstr, UString* ustr);
UString* WStr_convertIntoUString2(WString* wstr, int start, int len, UString* ustr);
void WStr_dump(WString* s);

#ifdef __cplusplus
}
#endif

#endif