This repository was archived by the owner on Oct 7, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathustring.json
150 lines (149 loc) · 4.7 KB
/
ustring.json
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
{
"@metadata": {
"name": "ustring",
"comment": "The library is imported as default, it is \"implied\", and can be fully identified by the library prefix. This is nearly always named as \"mw.html\", as it is part of the standard mw-lib, so it is pretty safe to assume it can be used as prefix.",
"authors": [
"Jeblad"
]
},
"mw.ustring 001": {
"prefix": "mw.ustring.maxPatternLength",
"body": [
"mw.ustring.maxPatternLength$0"
],
"description": "The maximum allowed length of a pattern, in bytes.\n"
},
"mw.ustring 002": {
"prefix": "mw.ustring.maxStringLength",
"body": [
"mw.ustring.maxPatternLength$0"
],
"description": "The maximum allowed length of a ustring, in bytes.\n"
},
"mw.ustring 003": {
"prefix": "mw.ustring.byte( string[, firstIndex[, lastIndex]] )",
"body": [
"mw.ustring.byte( ${1:string}${2:, ${3:firstIndex}${4:, ${5:lastIndex}}} )$0"
],
"description": "Returns the ustring as an array of bytes.\n"
},
"mw.ustring 004": {
"prefix": "mw.ustring.byteoffset( string[, length[, start]] )",
"body": [
"mw.ustring.byteoffset( ${1:string}${2:, ${3:length}${4:, ${5:start}}} )$0"
],
"description": "Returns the byte offset of a character in the ustring.\n"
},
"mw.ustring 005": {
"prefix": "mw.ustring.char( ... )",
"body": [
"mw.ustring.char( ${1:...} )$0"
],
"description": "Returns the arguments as a ustring of chars.\n"
},
"mw.ustring 006": {
"prefix": "mw.ustring.codepoint( string[, firstIndex[, lastIndex]] )",
"body": [
"mw.ustring.codepoint( ${1:string}${2:, ${3:firstIndex}${4:, ${5:lastIndex}}} )$0"
],
"description": "Returns the ustring as an array of codepoints.\n"
},
"mw.ustring 007": {
"prefix": "mw.ustring.find( string, pattern[, init[, plain]] )",
"body": [
"mw.ustring.find( ${1:string}, ${2:pattern}${3:, ${4:init}${5:, ${6:plain}}} )$0"
],
"description": "Search for the first occurence of pattern within the ustring.\n"
},
"mw.ustring 008": {
"prefix": "mw.ustring.format( format[, ...] )",
"body": [
"mw.ustring.format( ${1:format}${2:, ${3:...}} )$0"
],
"description": "Formats the ustring, and injects optional arguments.\n"
},
"mw.ustring 009": {
"prefix": "mw.ustring.gcodepoint( string[, firstIndex[, lastIndex]] )",
"body": [
"mw.ustring.gcodepoint( ${1:string}${2:, ${3:firstIndex}${4:, ${5:lastIndex}}} )$0"
],
"description": "Creates an iterator for the codepoints from the given arguments.\n"
},
"mw.ustring 010": {
"prefix": "mw.ustring.gmatch( string, pattern )",
"body": [
"mw.ustring.gmatch( ${1:string}, ${2:pattern} )$0"
],
"description": "Creates an iterator for the captures from the given arguments.\n"
},
"mw.ustring 011": {
"prefix": "mw.ustring.gsub( string, pattern, replacement[, number] )",
"body": [
"mw.ustring.gsub(${1:string}, ${2:pattern}, ${3:replacement}${4:, ${5:number}} )$0"
],
"description": "Returns the ustring with occurences of patterns replaced.\n"
},
"mw.ustring 012": {
"prefix": "mw.ustring.isutf8( string )",
"body": [
"mw.ustring.isutf8( ${1:string} )$0"
],
"description": "Checks whether the ustring is valid UTF-8.\n"
},
"mw.ustring 013": {
"prefix": "mw.ustring.len( string )",
"body": [
"mw.ustring.len( ${1:string} )$0"
],
"description": "Calculates the length of the string in bytes.\n"
},
"mw.ustring 014": {
"prefix": "mw.ustring.lower( string )",
"body": [
"mw.ustring.lower( ${1:string} )$0"
],
"description": "Change all unicode uppercase letters to lowercase.\n"
},
"mw.ustring 015": {
"prefix": "mw.ustring.match( string, pattern[, init] )",
"body": [
"mw.ustring.match( ${1:string}, ${2:pattern}${3:, ${4:init}} )$0"
],
"description": "Returns the first part matched by pattern.\n"
},
"mw.ustring 016": {
"prefix": "mw.ustring.rep( string, number )",
"body": [
"mw.ustring.rep( ${1:string}, ${2:number} )$0"
],
"description": "Returns a string with number copies of string.\n"
},
"mw.ustring 017": {
"prefix": "mw.ustring.sub( string, firstIndex[, lastIndex] )",
"body": [
"mw.ustring.sub( ${1:string}, ${2:firstIndex}${3:, ${4:lastIndex}} )$0"
],
"description": "Returns the part given by the arguments.\n"
},
"mw.ustring 018": {
"prefix": "mw.ustring.toNFC( string )",
"body": [
"mw.ustring.toNFC( ${1:string} )$0"
],
"description": "Converts the string to Normalization Form C.\n"
},
"mw.ustring 019": {
"prefix": "mw.ustring.toNFD( string )",
"body": [
"mw.ustring.toNFD( ${1:string} )$0"
],
"description": "Converts the string to Normalization Form D.\n"
},
"mw.ustring 020": {
"prefix": "mw.ustring.upper( string )",
"body": [
"mw.ustring.upper( ${1:string} )$0"
],
"description": "Change all unicode lowercase letters to uppercase.\n"
}
}