diff --git a/lua/user_api/types/user/util.lua b/lua/user_api/types/user/util.lua index 3612dd1..3e72626 100644 --- a/lua/user_api/types/user/util.lua +++ b/lua/user_api/types/user/util.lua @@ -33,15 +33,16 @@ require('user_api.types.user.autocmd') ---@class User.Util.Notify ---@field notify fun(msg: string, lvl: NotifyLvl|VimNotifyLvl?, opts: NotifyOpts?) +---@class User.Util.String.Alphabet.Vowels +---@field upper_map { ['A']: 'A', ['E']: 'E', ['I']: 'I', ['O']: 'O', ['U']: 'U' } +---@field lower_map { ['a']: 'a', ['e']: 'e', ['i']: 'i', ['o']: 'o', ['u']: 'u' } + ---@class User.Util.String.Alphabet ---@field upper_list string[] ---@field lower_list string[] ---@field upper_map table ---@field lower_map table - ----@class User.Util.String.Vowels: User.Util.String.Alphabet ----@field upper_map { ['A']: 'A', ['E']: 'E', ['I']: 'I', ['O']: 'O', ['U']: 'U' } ----@field lower_map { ['a']: 'a', ['e']: 'e', ['i']: 'i', ['o']: 'o', ['u']: 'u' } +---@field vowels User.Util.String.Alphabet.Vowels ---@class User.Util.String.Digits ---@field all table @@ -52,7 +53,6 @@ require('user_api.types.user.autocmd') ---@class User.Util.String ---@field alphabet User.Util.String.Alphabet ----@field vowels User.Util.String.Vowels ---@field digits User.Util.String.Digits ---@field capitalize fun(s: string, use_dot: boolean?, triggers: string[]?): (new_str: string) diff --git a/lua/user_api/util/string.lua b/lua/user_api/util/string.lua index 538416c..b351fbc 100644 --- a/lua/user_api/util/string.lua +++ b/lua/user_api/util/string.lua @@ -120,29 +120,29 @@ M.alphabet.lower_map = { } ---@diagnostic disable-next-line:missing-fields -M.vowels = {} -M.vowels.upper_list = { +M.alphabet.vowcals = {} +M.alphabet.vowcals.upper_list = { 'A', 'E', 'I', 'O', 'U', } -M.vowels.lower_list = { +M.alphabet.vowcals.lower_list = { 'a', 'e', 'i', 'o', 'u', } -M.vowels.upper_map = { +M.alphabet.vowcals.upper_map = { A = 'A', E = 'E', I = 'I', O = 'O', U = 'U', } -M.vowels.lower_map = { +M.alphabet.vowcals.lower_map = { a = 'a', e = 'e', i = 'i',