Skip to content
This repository was archived by the owner on Oct 2, 2024. It is now read-only.

Commit f3a505c

Browse files
committed
Add support for CamelCase function names
1 parent e8f318d commit f3a505c

File tree

1 file changed

+105
-2
lines changed

1 file changed

+105
-2
lines changed

Source/TypeChecking.lua

Lines changed: 105 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ export type StringPlusPascal = {
6060
RFind: (Str: string, Sub: string, Start: number?, End: number?) -> (number?, number?),
6161
Partition: (Str: string, Separator: string, ReturnAsATuple: boolean?) -> (...string | {string}),
6262
RPartition: (Str: string, Separator: string, ReturnAsATuple: boolean?) -> (...string | {string}),
63-
BinaryEncode: (Str: string) -> string,
63+
BinaryEncode: (Str: string, ByteSeparator: string?) -> string,
6464
BinaryDecode: (BinaryStr: string) -> string,
6565
HexEncode: (Str: string) -> string,
6666
HexDecode: (HexStr: string) -> string?,
@@ -163,7 +163,7 @@ export type StringPlusLowered = {
163163
rfind: (Str: string, Sub: string, Start: number?, End: number?) -> (number?, number?),
164164
partition: (Str: string, Separator: string, ReturnAsATuple: boolean?) -> (...string | {string}),
165165
rpartition: (Str: string, Separator: string, ReturnAsATuple: boolean?) -> (...string | {string}),
166-
binaryencode: (Str: string) -> string,
166+
binaryencode: (Str: string, ByteSeparator: string?) -> string,
167167
binarydecode: (BinaryStr: string) -> string,
168168
hexencode: (Str: string) -> string,
169169
hexdecode: (HexStr: string) -> string?,
@@ -206,4 +206,107 @@ export type StringPlusLowered = {
206206
]]
207207
}
208208

209+
export type StringPlusCamel = {
210+
isNumeric: (Str: string) -> boolean,
211+
isInteger: (Str: string) -> boolean,
212+
isAlpha: (Str: string) -> boolean,
213+
isAlphaNum: (Str: string) -> boolean,
214+
isBlank: (Str: string) -> boolean,
215+
isEmpty: (Str: string) -> boolean,
216+
isUpper: (Str: string) -> boolean,
217+
isLower: (Str: string) -> boolean,
218+
isASCII: (Str: string) -> boolean,
219+
isTitle: (Str: string, Strict: boolean?) -> boolean,
220+
isTagged: (Str: string, FullMatch: boolean?) -> boolean,
221+
isPalindrome: (Str: string, CaseSensitive: boolean?) -> boolean,
222+
223+
iSentences: (Str: string) -> ((string) -> (number, number, string, string), string, number),
224+
iWords: (Str: string) -> ((string, number) -> (number, number, string), string, number),
225+
iCharacters: (Str: string) -> ((string, number) -> (number, string), string, number),
226+
227+
random: (Length: number?, CharSetPattern: string?) -> string,
228+
generateKey: (CharSet: ({string} | string?), TotalSections: number?, SectionLength: number?, Delimiter: string?, Prefix: string?, Suffix: string?) -> string,
229+
230+
uTF8Reverse: (Str: string) -> string,
231+
stringify: (Tabel: {[any]: any}, TabSize: number?, IndentionCharacter: string?, Recursive: boolean?, Cache: {[any]: any}?, CIndention: number?) -> string,
232+
233+
escape: (Str: string) -> string,
234+
truncate: (Str: string, Length: number, OmissionSuffix: string?) -> string,
235+
removeExtraSpaces: (Str: string) -> string,
236+
equalsIgnoreCase: (Str_1: string, Str_2: string) -> boolean,
237+
removeVowels: (Str: string, Replacement: string?) -> string,
238+
removeConsonants: (Str: string, Replacement: string?) -> string,
239+
removePunctuation: (Str: string, Replacement: string?) -> string,
240+
matchIgnoreCase: (Str: string, Pattern: string, Init: number?) -> string?,
241+
swapCase: (Str: string) -> string,
242+
strip: (Str: string, Characters: string?) -> string,
243+
rStrip: (Str: string, Characters: string?) -> string,
244+
lStrip: (Str: string, Characters: string?) -> string,
245+
center: (Str: string, Length: number, FillChar: string?) -> string,
246+
rJust: (Str: string, Length: number, FillChar: string?) -> string,
247+
lJust: (Str: string, Length: number, FillChar: string?) -> string,
248+
expandTabs: (Str: string, TabSize: number?) -> string,
249+
translate: (Str: string, MappingTable: {[number]: number}) -> string,
250+
count: (Str: string, Pattern: string, Start: number?, End: number?) -> number,
251+
contains: (Str: string, SubStrings: (string | {string})) -> (boolean, string?, number, number),
252+
starts: (Str: string, Prefixes: (string | {string})) -> boolean,
253+
ends: (Str: string, Suffixes: (string | {string})) -> boolean,
254+
sortWords: (Str: string, Order: Enum.SortDirection?, ReturnArray: boolean?) -> ({string} | string),
255+
sortByLength: (StringArray: {string}, Order: Enum.SortDirection?) -> {string},
256+
alphabeticalOrder: (StringArray: {string}, Order: Enum.SortDirection?) -> {string},
257+
filterByLength: (StringArray: {string}, Length: number) -> {string},
258+
longestWord: (Str: string) -> (string, number),
259+
reverseWords: (Str: string) -> string,
260+
camelCase: (Str: string) -> string,
261+
snakeCase: (Str: string) -> string,
262+
uniqueWords: (Str: string, ReturnString: boolean?) -> ({string} | string),
263+
expand: (Str: string, Subset: {[string | number]: any}) -> string,
264+
applyTitleCase: (Str: string, Strict: boolean?) -> string,
265+
lines: (Str: string, KeepEnds: boolean?, ReturnAsATuple: boolean?) -> (...string | {string}),
266+
rFind: (Str: string, Sub: string, Start: number?, End: number?) -> (number?, number?),
267+
partition: (Str: string, Separator: string, ReturnAsATuple: boolean?) -> (...string | {string}),
268+
rPartition: (Str: string, Separator: string, ReturnAsATuple: boolean?) -> (...string | {string}),
269+
binaryEncode: (Str: string, ByteSeparator: string?) -> string,
270+
binaryDecode: (BinaryStr: string) -> string,
271+
hexEncode: (Str: string) -> string,
272+
hexDecode: (HexStr: string) -> string?,
273+
analyzeText: (Str: string) -> {
274+
lineCount: number,
275+
wordCount: number,
276+
avgWordLength: number,
277+
uniqueWordCount: number,
278+
commonWordCount: number,
279+
wordAppearCount: {[string]: number},
280+
shortestWord: {Word: string, Length: number},
281+
longestWord: {Word: string, Length: number},
282+
allCharacterCount: number,
283+
alphaCharacterCount: number,
284+
vowelCount: number,
285+
consonantCount: number,
286+
digitCount: number,
287+
punctuationCount: number,
288+
},
289+
290+
--| Standard String Library Typechecking: (Disable this multi-line comment if wanted)
291+
--[[
292+
Byte: (s: string, i: number, j: number) -> (...number),
293+
Char: (byte: number, ...number) -> string,
294+
Find: (s: string, pattern: string, init: number?, plain: boolean?) -> (number?, number?, ...string?),
295+
Format: (s: string, ...any) -> string,
296+
Gmatch: (s: string, pattern: string) -> (() -> string),
297+
Gsub: (s: string, pattern: string, replacement: string | {[string]: string} | ((...string) -> string), replacements: number?) -> (string, number),
298+
Len: (s: string) -> number,
299+
Lower: (s: string) -> string,
300+
Match: (s: string, pattern: number, init: number?) -> (...string?),
301+
Pack: (format: string, ... any) -> string,
302+
Packsize: (format: string) -> number,
303+
Rep: (s: string, n: number) -> string,
304+
Reverse: (s: string) -> string,
305+
Split: (s: string, separator: string?) -> {string},
306+
Sub: (s: string, i: number, j: number) -> string,
307+
Unpack: (format: string, data: string, readStart: string?) -> (...any),
308+
Upper: (s: string) -> string,
309+
]]
310+
}
311+
209312
return TypeChecking

0 commit comments

Comments
 (0)