summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2026-03-28 15:46:11 +0800
committerGitHub <[email protected]>2026-03-28 15:46:11 +0800
commit1df5ac2921a800c766fc64d4db6a85975c171e32 (patch)
treefeb30c468c4e89a5c8338b4a90786d97ceed481e
parentc86b161f6b27040289c75f3cafe7a863dea737bc (diff)
parentc08081788e880f32f1835eab49aae5806cb19721 (diff)
Merge pull request #7424 from xmake-io/comments
improve comments
-rw-r--r--xmake/core/base/binutils.lua37
-rw-r--r--xmake/core/base/bloom_filter.lua9
-rw-r--r--xmake/core/base/bytes.lua12
-rw-r--r--xmake/core/base/cli.lua14
-rw-r--r--xmake/core/base/colors.lua10
-rw-r--r--xmake/core/base/cpu.lua50
-rw-r--r--xmake/core/base/emoji.lua6
-rw-r--r--xmake/core/base/fwatcher.lua19
-rw-r--r--xmake/core/base/global.lua21
-rw-r--r--xmake/core/base/graph.lua6
-rw-r--r--xmake/core/base/hash.lua53
-rw-r--r--xmake/core/base/hashset.lua13
-rw-r--r--xmake/core/base/heap.lua12
-rw-r--r--xmake/core/base/io.lua53
-rw-r--r--xmake/core/base/linuxos.lua21
-rw-r--r--xmake/core/base/list.lua5
-rw-r--r--xmake/core/base/macos.lua5
-rw-r--r--xmake/core/base/memory.lua4
-rw-r--r--xmake/core/base/os.lua46
-rw-r--r--xmake/core/base/path.lua64
-rw-r--r--xmake/core/base/privilege.lua12
-rw-r--r--xmake/core/base/queue.lua5
-rw-r--r--xmake/core/base/semver.lua12
-rw-r--r--xmake/core/base/signal.lua14
-rw-r--r--xmake/core/base/singleton.lua4
-rw-r--r--xmake/core/base/socket.lua35
-rw-r--r--xmake/core/base/table.lua76
-rw-r--r--xmake/core/base/text.lua8
-rw-r--r--xmake/core/base/thread.lua34
-rw-r--r--xmake/core/base/tty.lua10
-rw-r--r--xmake/core/base/winos.lua18
-rw-r--r--xmake/core/project/config.lua24
-rw-r--r--xmake/core/project/project.lua21
-rw-r--r--xmake/core/tool/compiler.lua15
-rw-r--r--xmake/core/tool/linker.lua11
-rw-r--r--xmake/core/tool/toolchain.lua7
-rw-r--r--xmake/modules/core/project/depend.lua9
37 files changed, 686 insertions, 89 deletions
diff --git a/xmake/core/base/binutils.lua b/xmake/core/base/binutils.lua
index 7e08ac317..7adfe6efa 100644
--- a/xmake/core/base/binutils.lua
+++ b/xmake/core/base/binutils.lua
@@ -36,7 +36,12 @@ binutils._rpath_clean = binutils._rpath_clean or binutils.rpath_clean
binutils._extractlib = binutils._extractlib or binutils.extractlib
binutils._format = binutils._format or binutils.format
--- generate c/c++ code from the binary file
+-- generate c/c++ header with binary data from the binary file
+--
+-- @param binaryfile the input binary file path
+-- @param outputfile the output header file path
+-- @param opt the options, e.g. {nozeroend = true}
+--
function binutils.bin2c(binaryfile, outputfile, opt)
opt = opt or {}
if binutils._bin2c then
@@ -95,7 +100,11 @@ function binutils.bin2obj(binaryfile, outputfile, opt)
end
end
--- get binary file format (auto-detect format: coff, elf, macho, ar, pe, unknown)
+-- get binary file format (auto-detect: coff, elf, macho, ar, pe, unknown)
+--
+-- @param binaryfile the binary file path
+-- @return the format string
+--
function binutils.format(binaryfile)
if binutils._format then
return binutils._format(binaryfile)
@@ -105,7 +114,11 @@ function binutils.format(binaryfile)
end
--- read symbols from object file (auto-detect format: COFF, ELF, or Mach-O)
+-- read symbols from object file (auto-detect: COFF, ELF, or Mach-O)
+--
+-- @param binaryfile the binary file path
+-- @return the symbols table, or nil and error info
+--
function binutils.readsyms(binaryfile)
if binutils._readsyms then
return binutils._readsyms(binaryfile)
@@ -114,7 +127,11 @@ function binutils.readsyms(binaryfile)
end
end
--- get dependent libraries from binary file (auto-detect format: COFF, ELF, or Mach-O)
+-- get dependent libraries from binary file (auto-detect: COFF, ELF, or Mach-O)
+--
+-- @param binaryfile the binary file path
+-- @return the dependent libraries table, or nil and error info
+--
function binutils.deplibs(binaryfile)
if binutils._deplibs then
return binutils._deplibs(binaryfile)
@@ -123,7 +140,11 @@ function binutils.deplibs(binaryfile)
end
end
--- get rpath list from binary file (auto-detect format: ELF or Mach-O)
+-- get rpath list from binary file (auto-detect: ELF or Mach-O)
+--
+-- @param binaryfile the binary file path
+-- @return the rpath list table, or nil and error info
+--
function binutils.rpath_list(binaryfile)
if binutils._rpath_list then
return binutils._rpath_list(binaryfile)
@@ -134,7 +155,11 @@ end
-- insert rpath to binary file (auto-detect format: ELF or Mach-O)
--- clean rpaths from binary file (auto-detect format: ELF or Mach-O)
+-- clean rpaths from binary file (auto-detect: ELF or Mach-O)
+--
+-- @param binaryfile the binary file path
+-- @return true on success, or false and error info
+--
function binutils.rpath_clean(binaryfile)
if binutils._rpath_clean then
return binutils._rpath_clean(binaryfile)
diff --git a/xmake/core/base/bloom_filter.lua b/xmake/core/base/bloom_filter.lua
index d7e6eb0e3..d82618be9 100644
--- a/xmake/core/base/bloom_filter.lua
+++ b/xmake/core/base/bloom_filter.lua
@@ -175,7 +175,14 @@ function _instance:__gc()
end
end
--- new a bloom filter, e.g. {probability = 0.001, hash_count = 3, item_maxn = 1000000}
+-- create a new bloom filter
+--
+-- @param opt the options
+-- - probability: false positive rate (default: 0.001), supports 0.1 ~ 0.000001
+-- - hash_count: the hash function count (default: 3)
+-- - item_maxn: the maximum item count (default: 1000000)
+-- @return the bloom filter instance, or nil and error info
+--
function bloom_filter.new(opt)
opt = opt or {}
local probability = opt.probability or 0.001
diff --git a/xmake/core/base/bytes.lua b/xmake/core/base/bytes.lua
index f249096bf..35ccf8998 100644
--- a/xmake/core/base/bytes.lua
+++ b/xmake/core/base/bytes.lua
@@ -583,12 +583,20 @@ function _instance:__gc()
end
end
--- new an bytes instance
+-- create a new bytes instance
+--
+-- @param ... the data (string, number/size, cdata + size, or another bytes)
+-- @return the bytes instance
+--
function bytes.new(...)
return _instance.new(...)
end
--- is instance of bytes?
+-- is the data an instance of bytes?
+--
+-- @param data the data to check
+-- @return true if it is a bytes instance
+--
function bytes.instance_of(data)
if type(data) == "table" and data.cdata and data.size then
return true
diff --git a/xmake/core/base/cli.lua b/xmake/core/base/cli.lua
index fb1274537..7c2840b96 100644
--- a/xmake/core/base/cli.lua
+++ b/xmake/core/base/cli.lua
@@ -61,14 +61,24 @@ function cli._make_option(key, value, short, argv, argi)
return cli._make_segment("option", short and ("-" .. key .. " " .. value) or ("--" .. key .. "=" .. value), argv, argi, { key = key, value = value, short = short or false })
end
--- parse a argv string, command & sub-command should be omitted before calling this function
+-- parse a command line string into structured segments
+--
+-- @param args the command line string
+-- @param flags the short flags set (optional), e.g. {v = true, f = true}
+-- @return the parsed segments array [{type, key, value, short}, ...]
-- @see https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap12.html
+--
function cli.parse(args, flags)
return cli.parsev(os.argv(args), flags)
end
--- parse a argv array, command & sub-command should be omitted before calling this function
+-- parse an argv array into structured segments
+--
+-- @param argv the arguments array
+-- @param flags the short flags set (optional), e.g. {v = true, f = true}
+-- @return the parsed segments array [{type, key, value, short}, ...]
-- @see https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap12.html
+--
function cli.parsev(argv, flags)
local parsed = {}
diff --git a/xmake/core/base/colors.lua b/xmake/core/base/colors.lua
index 48318413e..3d3d1d0bf 100644
--- a/xmake/core/base/colors.lua
+++ b/xmake/core/base/colors.lua
@@ -233,6 +233,10 @@ end
-- "${hello xmake}"
-- "${hello xmake $beer}"
--
+-- @param str the string with color/emoji markup
+-- @param opt the options, e.g. {patch_reset = true, ignore = false}
+-- @return the translated string with ANSI escape codes
+--
function colors.translate(str, opt)
-- check string
@@ -359,7 +363,11 @@ function colors.translate(str, opt)
return str
end
--- ignore all colors
+-- ignore all colors, strip color markup from string
+--
+-- @param str the string with color markup
+-- @return the plain string without colors
+--
function colors.ignore(str)
if str then
-- strip "${red}" and "${theme color}"
diff --git a/xmake/core/base/cpu.lua b/xmake/core/base/cpu.lua
index 56d424f4a..d5ec3fffb 100644
--- a/xmake/core/base/cpu.lua
+++ b/xmake/core/base/cpu.lua
@@ -281,34 +281,53 @@ function cpu._statinfo(name)
end
end
--- get vendor id
+-- get cpu vendor id, e.g. "GenuineIntel", "AuthenticAMD"
+--
+-- @return the vendor id string
+--
function cpu.vendor()
return cpu._info().vendor_id
end
--- get cpu model
+-- get cpu model number
+--
+-- @return the model number
+--
function cpu.model()
local cpu_model = cpu._info().cpu_model
return cpu_model and tonumber(cpu_model)
end
--- get cpu model name
+-- get cpu model name, e.g. "Intel(R) Core(TM) i7-10700K"
+--
+-- @return the model name string
+--
function cpu.model_name()
return cpu._info().cpu_model_name
end
--- get cpu family
+-- get cpu family number
+--
+-- @return the family number
+--
function cpu.family()
local cpu_family = cpu._info().cpu_family
return cpu_family and tonumber(cpu_family)
end
--- get cpu features
+-- get cpu features string, e.g. "sse sse2 avx avx2"
+--
+-- @return the features string (space separated)
+--
function cpu.features()
return cpu._info().cpu_features
end
--- has the given feature?
+-- has the given cpu feature?
+--
+-- @param name the feature name, e.g. "avx2", "sse4_2"
+-- @return true if supported
+--
function cpu.has_feature(name)
local features = cpu._FEATURES
if not features then
@@ -321,7 +340,10 @@ function cpu.has_feature(name)
return features:has(name)
end
--- get cpu micro architecture
+-- get cpu micro architecture, e.g. "skylake", "zen3"
+--
+-- @return the micro architecture name, or nil if unknown
+--
function cpu.march()
local march = cpu._MARCH
if march == nil then
@@ -336,17 +358,27 @@ function cpu.march()
return march
end
--- get cpu number
+-- get cpu core count
+--
+-- @return the number of cpu cores
+--
function cpu.number()
return cpu._statinfo("ncpu")
end
-- get cpu usage rate
+--
+-- @return the usage rate (0.0 ~ 1.0)
+--
function cpu.usagerate()
return cpu._statinfo("usagerate")
end
--- get cpu info
+-- get all cpu info as a table
+--
+-- @param name the specific info name (optional), e.g. "march", "ncpu"
+-- @return the cpu info table or specific value
+--
function cpu.info(name)
local cpuinfo = {}
cpuinfo.vendor = cpu.vendor()
diff --git a/xmake/core/base/emoji.lua b/xmake/core/base/emoji.lua
index 972b5e0cf..98ee6a720 100644
--- a/xmake/core/base/emoji.lua
+++ b/xmake/core/base/emoji.lua
@@ -31,7 +31,11 @@ emoji.keys =
four="4โƒฃ",kiss_ww="๐Ÿ‘ฉโค๐Ÿ’‹๐Ÿ‘ฉ",maple_leaf="๐Ÿ",waxing_gibbous_moon="๐ŸŒ”",bike="๐Ÿšฒ",recycle="โ™ป",family_mwgb="๐Ÿ‘จ๐Ÿ‘ฉ๐Ÿ‘ง๐Ÿ‘ฆ",flag_dk="๐Ÿ‡ฉ๐Ÿ‡ฐ",thought_balloon="๐Ÿ’ญ",oncoming_automobile="๐Ÿš˜",guardsman_tone5="๐Ÿ’‚๐Ÿฟ",tickets="๐ŸŽŸ",school="๐Ÿซ",house_abandoned="๐Ÿš",blue_book="๐Ÿ“˜",video_game="๐ŸŽฎ",triumph="๐Ÿ˜ค",suspension_railway="๐ŸšŸ",umbrella="โ˜”",levitate="๐Ÿ•ด",cactus="๐ŸŒต",monorail="๐Ÿš",stars="๐ŸŒ ",new="๐Ÿ†•",herb="๐ŸŒฟ",pouting_cat="๐Ÿ˜พ",blue_heart="๐Ÿ’™",["100"]="๐Ÿ’ฏ",leaves="๐Ÿƒ",family_mwbb="๐Ÿ‘จ๐Ÿ‘ฉ๐Ÿ‘ฆ๐Ÿ‘ฆ",information_desk_person_tone2="๐Ÿ’๐Ÿผ",dragon_face="๐Ÿฒ",track_next="โญ",cloud_snow="๐ŸŒจ",flag_jp="๐Ÿ‡ฏ๐Ÿ‡ต",children_crossing="๐Ÿšธ",information_desk_person_tone1="๐Ÿ’๐Ÿป",arrow_up_down="โ†•",mount_fuji="๐Ÿ—ป",massage_tone1="๐Ÿ’†๐Ÿป",flag_mq="๐Ÿ‡ฒ๐Ÿ‡ถ",massage_tone3="๐Ÿ’†๐Ÿฝ",massage_tone2="๐Ÿ’†๐Ÿผ",massage_tone5="๐Ÿ’†๐Ÿฟ",flag_je="๐Ÿ‡ฏ๐Ÿ‡ช",flag_jm="๐Ÿ‡ฏ๐Ÿ‡ฒ",flag_jo="๐Ÿ‡ฏ๐Ÿ‡ด",red_car="๐Ÿš—",hospital="๐Ÿฅ",red_circle="๐Ÿ”ด",princess="๐Ÿ‘ธ",tm="โ„ข",curly_loop="โžฐ",boy_tone5="๐Ÿ‘ฆ๐Ÿฟ",pouch="๐Ÿ‘",boy_tone3="๐Ÿ‘ฆ๐Ÿฝ",boy_tone1="๐Ÿ‘ฆ๐Ÿป",izakaya_lantern="๐Ÿฎ",fist_tone5="โœŠ๐Ÿฟ",fist_tone4="โœŠ๐Ÿพ",fist_tone1="โœŠ๐Ÿป",fist_tone3="โœŠ๐Ÿฝ",fist_tone2="โœŠ๐Ÿผ",arrow_lower_left="โ†™",game_die="๐ŸŽฒ",pushpin="๐Ÿ“Œ",dividers="๐Ÿ—‚",dolphin="๐Ÿฌ",night_with_stars="๐ŸŒƒ",cruise_ship="๐Ÿ›ณ",white_medium_small_square="โ—ฝ",kissing_closed_eyes="๐Ÿ˜š",earth_americas="๐ŸŒŽ",["end"]="๐Ÿ”š",mouse="๐Ÿญ",rewind="โช",beach="๐Ÿ–",pizza="๐Ÿ•",briefcase="๐Ÿ’ผ",customs="๐Ÿ›ƒ",heartpulse="๐Ÿ’—",sparkler="๐ŸŽ‡",sparkles="โœจ",hand_splayed_tone1="๐Ÿ–๐Ÿป",snowman2="โ˜ƒ",tulip="๐ŸŒท",speaking_head="๐Ÿ—ฃ",ambulance="๐Ÿš‘",office="๐Ÿข",clapper="๐ŸŽฌ",keyboard="โŒจ",japan="๐Ÿ—พ",post_office="๐Ÿฃ",dizzy_face="๐Ÿ˜ต",imp="๐Ÿ‘ฟ",flag_ve="๐Ÿ‡ป๐Ÿ‡ช",coffee="โ˜•",flag_vg="๐Ÿ‡ป๐Ÿ‡ฌ",flag_va="๐Ÿ‡ป๐Ÿ‡ฆ",flag_vc="๐Ÿ‡ป๐Ÿ‡จ",flag_vn="๐Ÿ‡ป๐Ÿ‡ณ",flag_vi="๐Ÿ‡ป๐Ÿ‡ฎ",open_mouth="๐Ÿ˜ฎ",flag_vu="๐Ÿ‡ป๐Ÿ‡บ",page_with_curl="๐Ÿ“ƒ",bank="๐Ÿฆ",bread="๐Ÿž",oncoming_police_car="๐Ÿš”",capricorn="โ™‘",point_left="๐Ÿ‘ˆ",tokyo_tower="๐Ÿ—ผ",fishing_pole_and_fish="๐ŸŽฃ",thumbsdown="๐Ÿ‘Ž",telescope="๐Ÿ”ญ",spider="๐Ÿ•ท",u7121="๐Ÿˆš",camera_with_flash="๐Ÿ“ธ",lifter="๐Ÿ‹",sweet_potato="๐Ÿ ",lock_with_ink_pen="๐Ÿ”",ok_woman_tone2="๐Ÿ™†๐Ÿผ",ok_woman_tone3="๐Ÿ™†๐Ÿฝ",smirk="๐Ÿ˜",baggage_claim="๐Ÿ›„",cherry_blossom="๐ŸŒธ",sparkle="โ‡",zap="โšก",construction_site="๐Ÿ—",dancers="๐Ÿ‘ฏ",flower_playing_cards="๐ŸŽด",hatching_chick="๐Ÿฃ",free="๐Ÿ†“",bullettrain_side="๐Ÿš„",poultry_leg="๐Ÿ—",grapes="๐Ÿ‡",smirk_cat="๐Ÿ˜ผ",lollipop="๐Ÿญ",water_buffalo="๐Ÿƒ",black_medium_small_square="โ—พ",atm="๐Ÿง",gift_heart="๐Ÿ’",older_woman_tone5="๐Ÿ‘ต๐Ÿฟ",older_woman_tone4="๐Ÿ‘ต๐Ÿพ",older_woman_tone1="๐Ÿ‘ต๐Ÿป",older_woman_tone3="๐Ÿ‘ต๐Ÿฝ",older_woman_tone2="๐Ÿ‘ต๐Ÿผ",scissors="โœ‚",woman_tone2="๐Ÿ‘ฉ๐Ÿผ",basketball="๐Ÿ€",hammer_pick="โš’",top="๐Ÿ”",clock630="๐Ÿ•ก",raising_hand_tone5="๐Ÿ™‹๐Ÿฟ",railway_track="๐Ÿ›ค",nail_care="๐Ÿ’…",crossed_flags="๐ŸŽŒ",minibus="๐Ÿš",white_sun_cloud="๐ŸŒฅ",shower="๐Ÿšฟ",smile_cat="๐Ÿ˜ธ",dog2="๐Ÿ•",loud_sound="๐Ÿ”Š",kaaba="๐Ÿ•‹",runner="๐Ÿƒ",ram="๐Ÿ",writing_hand="โœ",rat="๐Ÿ€",rice_scene="๐ŸŽ‘",milky_way="๐ŸŒŒ",vulcan_tone5="๐Ÿ––๐Ÿฟ",necktie="๐Ÿ‘”",kissing_cat="๐Ÿ˜ฝ",snowflake="โ„",paintbrush="๐Ÿ–Œ",crystal_ball="๐Ÿ”ฎ",mountain_bicyclist_tone4="๐Ÿšต๐Ÿพ",mountain_bicyclist_tone3="๐Ÿšต๐Ÿฝ",mountain_bicyclist_tone2="๐Ÿšต๐Ÿผ",mountain_bicyclist_tone1="๐Ÿšต๐Ÿป",koko="๐Ÿˆ",flag_it="๐Ÿ‡ฎ๐Ÿ‡น",flag_iq="๐Ÿ‡ฎ๐Ÿ‡ถ",flag_is="๐Ÿ‡ฎ๐Ÿ‡ธ",flag_ir="๐Ÿ‡ฎ๐Ÿ‡ท",flag_im="๐Ÿ‡ฎ๐Ÿ‡ฒ",flag_il="๐Ÿ‡ฎ๐Ÿ‡ฑ",flag_io="๐Ÿ‡ฎ๐Ÿ‡ด",flag_in="๐Ÿ‡ฎ๐Ÿ‡ณ",flag_ie="๐Ÿ‡ฎ๐Ÿ‡ช",flag_id="๐Ÿ‡ฎ๐Ÿ‡ฉ",flag_ic="๐Ÿ‡ฎ๐Ÿ‡จ",ballot_box_with_check="โ˜‘",mountain_bicyclist_tone5="๐Ÿšต๐Ÿฟ",metal="๐Ÿค˜",dog="๐Ÿถ",pineapple="๐Ÿ",no_good_tone3="๐Ÿ™…๐Ÿฝ",no_good_tone2="๐Ÿ™…๐Ÿผ",no_good_tone1="๐Ÿ™…๐Ÿป",scream="๐Ÿ˜ฑ",no_good_tone5="๐Ÿ™…๐Ÿฟ",no_good_tone4="๐Ÿ™…๐Ÿพ",flag_ua="๐Ÿ‡บ๐Ÿ‡ฆ",bomb="๐Ÿ’ฃ",flag_ug="๐Ÿ‡บ๐Ÿ‡ฌ",flag_um="๐Ÿ‡บ๐Ÿ‡ฒ",flag_us="๐Ÿ‡บ๐Ÿ‡ธ",construction_worker_tone1="๐Ÿ‘ท๐Ÿป",radio="๐Ÿ“ป",flag_uy="๐Ÿ‡บ๐Ÿ‡พ",flag_uz="๐Ÿ‡บ๐Ÿ‡ฟ",person_with_blond_hair_tone1="๐Ÿ‘ฑ๐Ÿป",cupid="๐Ÿ’˜",mens="๐Ÿšน",rice="๐Ÿš",point_right_tone1="๐Ÿ‘‰๐Ÿป",point_right_tone3="๐Ÿ‘‰๐Ÿฝ",point_right_tone2="๐Ÿ‘‰๐Ÿผ",sunglasses="๐Ÿ˜Ž",point_right_tone4="๐Ÿ‘‰๐Ÿพ",watch="โŒš",frowning="๐Ÿ˜ฆ",watermelon="๐Ÿ‰",wedding="๐Ÿ’’",person_frowning_tone4="๐Ÿ™๐Ÿพ",person_frowning_tone5="๐Ÿ™๐Ÿฟ",person_frowning_tone2="๐Ÿ™๐Ÿผ",person_frowning_tone3="๐Ÿ™๐Ÿฝ",person_frowning_tone1="๐Ÿ™๐Ÿป",flag_gw="๐Ÿ‡ฌ๐Ÿ‡ผ",flag_gu="๐Ÿ‡ฌ๐Ÿ‡บ",flag_gt="๐Ÿ‡ฌ๐Ÿ‡น",flag_gs="๐Ÿ‡ฌ๐Ÿ‡ธ",flag_gr="๐Ÿ‡ฌ๐Ÿ‡ท",flag_gq="๐Ÿ‡ฌ๐Ÿ‡ถ",flag_gp="๐Ÿ‡ฌ๐Ÿ‡ต",flag_gy="๐Ÿ‡ฌ๐Ÿ‡พ",flag_gg="๐Ÿ‡ฌ๐Ÿ‡ฌ",flag_gf="๐Ÿ‡ฌ๐Ÿ‡ซ",microscope="๐Ÿ”ฌ",flag_gd="๐Ÿ‡ฌ๐Ÿ‡ฉ",flag_gb="๐Ÿ‡ฌ๐Ÿ‡ง",flag_ga="๐Ÿ‡ฌ๐Ÿ‡ฆ",flag_gn="๐Ÿ‡ฌ๐Ÿ‡ณ",flag_gm="๐Ÿ‡ฌ๐Ÿ‡ฒ",flag_gl="๐Ÿ‡ฌ๐Ÿ‡ฑ",japanese_ogre="๐Ÿ‘น",flag_gi="๐Ÿ‡ฌ๐Ÿ‡ฎ",flag_gh="๐Ÿ‡ฌ๐Ÿ‡ญ",man_with_turban="๐Ÿ‘ณ",star_and_crescent="โ˜ช",writing_hand_tone3="โœ๐Ÿฝ",dromedary_camel="๐Ÿช",hash="#โƒฃ",hammer="๐Ÿ”จ",hourglass="โŒ›",postbox="๐Ÿ“ฎ",writing_hand_tone5="โœ๐Ÿฟ",writing_hand_tone4="โœ๐Ÿพ",wc="๐Ÿšพ",aquarius="โ™’",couple_with_heart="๐Ÿ’‘",ok_woman="๐Ÿ™†",raised_hands_tone4="๐Ÿ™Œ๐Ÿพ",cop="๐Ÿ‘ฎ",raised_hands_tone1="๐Ÿ™Œ๐Ÿป",cow="๐Ÿฎ",raised_hands_tone3="๐Ÿ™Œ๐Ÿฝ",white_large_square="โฌœ",pig_nose="๐Ÿฝ",ice_skate="โ›ธ",hotsprings="โ™จ",tone5="๐Ÿฟ",three="3โƒฃ",beer="๐Ÿบ",stadium="๐ŸŸ",airplane_departure="๐Ÿ›ซ",heavy_division_sign="โž—",flag_black="๐Ÿด",mushroom="๐Ÿ„",record_button="โบ",vulcan="๐Ÿ––",dash="๐Ÿ’จ",wind_chime="๐ŸŽ",anchor="โš“",seven="7โƒฃ",flag_hr="๐Ÿ‡ญ๐Ÿ‡ท",roller_coaster="๐ŸŽข",pen_ballpoint="๐Ÿ–Š",sushi="๐Ÿฃ",flag_ht="๐Ÿ‡ญ๐Ÿ‡น",flag_hu="๐Ÿ‡ญ๐Ÿ‡บ",flag_hk="๐Ÿ‡ญ๐Ÿ‡ฐ",dizzy="๐Ÿ’ซ",flag_hn="๐Ÿ‡ญ๐Ÿ‡ณ",flag_hm="๐Ÿ‡ญ๐Ÿ‡ฒ",arrow_forward="โ–ถ",violin="๐ŸŽป",orthodox_cross="โ˜ฆ",id="๐Ÿ†”",heart_decoration="๐Ÿ’Ÿ",first_quarter_moon="๐ŸŒ“",satellite="๐Ÿ“ก",tone3="๐Ÿฝ",christmas_tree="๐ŸŽ„",unicorn="๐Ÿฆ„",broken_heart="๐Ÿ’”",ocean="๐ŸŒŠ",hearts="โ™ฅ",snowman="โ›„",person_with_blond_hair_tone4="๐Ÿ‘ฑ๐Ÿพ",person_with_blond_hair_tone5="๐Ÿ‘ฑ๐Ÿฟ",person_with_blond_hair_tone2="๐Ÿ‘ฑ๐Ÿผ",person_with_blond_hair_tone3="๐Ÿ‘ฑ๐Ÿฝ",yen="๐Ÿ’ด",straight_ruler="๐Ÿ“",sleepy="๐Ÿ˜ช",green_apple="๐Ÿ",white_medium_square="โ—ป",flag_fr="๐Ÿ‡ซ๐Ÿ‡ท",grey_exclamation="โ•",innocent="๐Ÿ˜‡",flag_fm="๐Ÿ‡ซ๐Ÿ‡ฒ",flag_fo="๐Ÿ‡ซ๐Ÿ‡ด",flag_fi="๐Ÿ‡ซ๐Ÿ‡ฎ",flag_fj="๐Ÿ‡ซ๐Ÿ‡ฏ",flag_fk="๐Ÿ‡ซ๐Ÿ‡ฐ",menorah="๐Ÿ•Ž",yin_yang="โ˜ฏ",clock130="๐Ÿ•œ",gift="๐ŸŽ",prayer_beads="๐Ÿ“ฟ",stuck_out_tongue="๐Ÿ˜›",om_symbol="๐Ÿ•‰",city_dusk="๐ŸŒ†",massage_tone4="๐Ÿ’†๐Ÿพ",couple_ww="๐Ÿ‘ฉโค๐Ÿ‘ฉ",crown="๐Ÿ‘‘",sparkling_heart="๐Ÿ’–",clubs="โ™ฃ",person_with_pouting_face="๐Ÿ™Ž",newspaper2="๐Ÿ—ž",fog="๐ŸŒซ",dango="๐Ÿก",large_orange_diamond="๐Ÿ”ถ",flag_tn="๐Ÿ‡น๐Ÿ‡ณ",flag_to="๐Ÿ‡น๐Ÿ‡ด",point_up="โ˜",flag_tm="๐Ÿ‡น๐Ÿ‡ฒ",flag_tj="๐Ÿ‡น๐Ÿ‡ฏ",flag_tk="๐Ÿ‡น๐Ÿ‡ฐ",flag_th="๐Ÿ‡น๐Ÿ‡ญ",flag_tf="๐Ÿ‡น๐Ÿ‡ซ",flag_tg="๐Ÿ‡น๐Ÿ‡ฌ",corn="๐ŸŒฝ",flag_tc="๐Ÿ‡น๐Ÿ‡จ",flag_ta="๐Ÿ‡น๐Ÿ‡ฆ",flag_tz="๐Ÿ‡น๐Ÿ‡ฟ",flag_tv="๐Ÿ‡น๐Ÿ‡ป",flag_tw="๐Ÿ‡น๐Ÿ‡ผ",flag_tt="๐Ÿ‡น๐Ÿ‡น",flag_tr="๐Ÿ‡น๐Ÿ‡ท",eight_spoked_asterisk="โœณ",trophy="๐Ÿ†",black_small_square="โ–ช",o="โญ•",no_bell="๐Ÿ”•",curry="๐Ÿ›",alembic="โš—",sob="๐Ÿ˜ญ",waxing_crescent_moon="๐ŸŒ’",tiger2="๐Ÿ…",two="2โƒฃ",sos="๐Ÿ†˜",compression="๐Ÿ—œ",heavy_multiplication_x="โœ–",tennis="๐ŸŽพ",fireworks="๐ŸŽ†",skull_crossbones="โ˜ ",astonished="๐Ÿ˜ฒ",congratulations="ใŠ—",grey_question="โ”",arrow_upper_left="โ†–",arrow_double_up="โซ",triangular_flag_on_post="๐Ÿšฉ",gemini="โ™Š",door="๐Ÿšช",ship="๐Ÿšข",point_down_tone3="๐Ÿ‘‡๐Ÿฝ",point_down_tone4="๐Ÿ‘‡๐Ÿพ",point_down_tone5="๐Ÿ‘‡๐Ÿฟ",movie_camera="๐ŸŽฅ",ng="๐Ÿ†–",couple_mm="๐Ÿ‘จโค๐Ÿ‘จ",football="๐Ÿˆ",asterisk="*โƒฃ",taurus="โ™‰",articulated_lorry="๐Ÿš›",police_car="๐Ÿš“",flushed="๐Ÿ˜ณ",spades="โ™ ",cloud_lightning="๐ŸŒฉ",wine_glass="๐Ÿท",clock830="๐Ÿ•ฃ",punch_tone2="๐Ÿ‘Š๐Ÿผ",punch_tone3="๐Ÿ‘Š๐Ÿฝ",punch_tone1="๐Ÿ‘Š๐Ÿป",department_store="๐Ÿฌ",punch_tone4="๐Ÿ‘Š๐Ÿพ",punch_tone5="๐Ÿ‘Š๐Ÿฟ",crocodile="๐ŸŠ",white_square_button="๐Ÿ”ณ",hole="๐Ÿ•ณ",boy_tone2="๐Ÿ‘ฆ๐Ÿผ",mountain_cableway="๐Ÿš ",melon="๐Ÿˆ",persevere="๐Ÿ˜ฃ",trident="๐Ÿ”ฑ",head_bandage="๐Ÿค•",u7a7a="๐Ÿˆณ",cool="๐Ÿ†’",high_brightness="๐Ÿ”†",deciduous_tree="๐ŸŒณ",white_flower="๐Ÿ’ฎ",gun="๐Ÿ”ซ",flag_sk="๐Ÿ‡ธ๐Ÿ‡ฐ",flag_sj="๐Ÿ‡ธ๐Ÿ‡ฏ",flag_si="๐Ÿ‡ธ๐Ÿ‡ฎ",flag_sh="๐Ÿ‡ธ๐Ÿ‡ญ",flag_so="๐Ÿ‡ธ๐Ÿ‡ด",flag_sn="๐Ÿ‡ธ๐Ÿ‡ณ",flag_sm="๐Ÿ‡ธ๐Ÿ‡ฒ",flag_sl="๐Ÿ‡ธ๐Ÿ‡ฑ",flag_sc="๐Ÿ‡ธ๐Ÿ‡จ",flag_sb="๐Ÿ‡ธ๐Ÿ‡ง",flag_sa="๐Ÿ‡ธ๐Ÿ‡ฆ",flag_sg="๐Ÿ‡ธ๐Ÿ‡ฌ",flag_tl="๐Ÿ‡น๐Ÿ‡ฑ",flag_se="๐Ÿ‡ธ๐Ÿ‡ช",arrow_left="โฌ…",flag_sz="๐Ÿ‡ธ๐Ÿ‡ฟ",flag_sy="๐Ÿ‡ธ๐Ÿ‡พ",small_orange_diamond="๐Ÿ”ธ",flag_ss="๐Ÿ‡ธ๐Ÿ‡ธ",flag_sr="๐Ÿ‡ธ๐Ÿ‡ท",flag_sv="๐Ÿ‡ธ๐Ÿ‡ป",flag_st="๐Ÿ‡ธ๐Ÿ‡น",file_folder="๐Ÿ“",flag_td="๐Ÿ‡น๐Ÿ‡ฉ",["1234"]="๐Ÿ”ข",smiling_imp="๐Ÿ˜ˆ",surfer_tone2="๐Ÿ„๐Ÿผ",surfer_tone3="๐Ÿ„๐Ÿฝ",surfer_tone4="๐Ÿ„๐Ÿพ",surfer_tone5="๐Ÿ„๐Ÿฟ",amphora="๐Ÿบ",baseball="โšพ",boy="๐Ÿ‘ฆ",flag_es="๐Ÿ‡ช๐Ÿ‡ธ",raised_hands="๐Ÿ™Œ",flag_eu="๐Ÿ‡ช๐Ÿ‡บ",flag_et="๐Ÿ‡ช๐Ÿ‡น",heavy_plus_sign="โž•",bow="๐Ÿ™‡",flag_ea="๐Ÿ‡ช๐Ÿ‡ฆ",flag_ec="๐Ÿ‡ช๐Ÿ‡จ",flag_ee="๐Ÿ‡ช๐Ÿ‡ช",light_rail="๐Ÿšˆ",flag_eg="๐Ÿ‡ช๐Ÿ‡ฌ",flag_eh="๐Ÿ‡ช๐Ÿ‡ญ",massage="๐Ÿ’†",man_with_gua_pi_mao_tone4="๐Ÿ‘ฒ๐Ÿพ",man_with_gua_pi_mao_tone3="๐Ÿ‘ฒ๐Ÿฝ",outbox_tray="๐Ÿ“ค",clock330="๐Ÿ•ž",projector="๐Ÿ“ฝ",sake="๐Ÿถ",confounded="๐Ÿ˜–",angry="๐Ÿ˜ ",iphone="๐Ÿ“ฑ",sweat_smile="๐Ÿ˜…",aries="โ™ˆ",ear_of_rice="๐ŸŒพ",mouse2="๐Ÿ",bicyclist_tone4="๐Ÿšด๐Ÿพ",bicyclist_tone5="๐Ÿšด๐Ÿฟ",guardsman="๐Ÿ’‚",bicyclist_tone1="๐Ÿšด๐Ÿป",bicyclist_tone2="๐Ÿšด๐Ÿผ",bicyclist_tone3="๐Ÿšด๐Ÿฝ",envelope="โœ‰",money_with_wings="๐Ÿ’ธ",beers="๐Ÿป",heart_exclamation="โฃ",notepad_spiral="๐Ÿ—’",cat="๐Ÿฑ",running_shirt_with_sash="๐ŸŽฝ",ferry="โ›ด",spy="๐Ÿ•ต",chart_with_upwards_trend="๐Ÿ“ˆ",green_heart="๐Ÿ’š",confused="๐Ÿ˜•",angel_tone4="๐Ÿ‘ผ๐Ÿพ",scorpius="โ™",sailboat="โ›ต",elephant="๐Ÿ˜",map="๐Ÿ—บ",disappointed_relieved="๐Ÿ˜ฅ",flag_xk="๐Ÿ‡ฝ๐Ÿ‡ฐ",motorway="๐Ÿ›ฃ",sun_with_face="๐ŸŒž",birthday="๐ŸŽ‚",mag="๐Ÿ”",date="๐Ÿ“…",dove="๐Ÿ•Š",man="๐Ÿ‘จ",octopus="๐Ÿ™",wheelchair="โ™ฟ",truck="๐Ÿšš",sa="๐Ÿˆ‚",shield="๐Ÿ›ก",haircut="๐Ÿ’‡",last_quarter_moon_with_face="๐ŸŒœ",rosette="๐Ÿต",currency_exchange="๐Ÿ’ฑ",mailbox_with_no_mail="๐Ÿ“ญ",bath="๐Ÿ›€",clock930="๐Ÿ•ค",bowling="๐ŸŽณ",turtle="๐Ÿข",pause_button="โธ",construction_worker="๐Ÿ‘ท",unlock="๐Ÿ”“",anger_right="๐Ÿ—ฏ",beetle="๐Ÿž",girl="๐Ÿ‘ง",sunrise="๐ŸŒ…",exclamation="โ—",flag_dz="๐Ÿ‡ฉ๐Ÿ‡ฟ",family_mmgg="๐Ÿ‘จ๐Ÿ‘จ๐Ÿ‘ง๐Ÿ‘ง",factory="๐Ÿญ",flag_do="๐Ÿ‡ฉ๐Ÿ‡ด",flag_dm="๐Ÿ‡ฉ๐Ÿ‡ฒ",flag_dj="๐Ÿ‡ฉ๐Ÿ‡ฏ",mouse_three_button="๐Ÿ–ฑ",flag_dg="๐Ÿ‡ฉ๐Ÿ‡ฌ",flag_de="๐Ÿ‡ฉ๐Ÿ‡ช",star_of_david="โœก",reminder_ribbon="๐ŸŽ—",grimacing="๐Ÿ˜ฌ",thumbsup_tone3="๐Ÿ‘๐Ÿฝ",thumbsup_tone2="๐Ÿ‘๐Ÿผ",thumbsup_tone1="๐Ÿ‘๐Ÿป",musical_note="๐ŸŽต",thumbsup_tone5="๐Ÿ‘๐Ÿฟ",thumbsup_tone4="๐Ÿ‘๐Ÿพ",high_heel="๐Ÿ‘ ",green_book="๐Ÿ“—",headphones="๐ŸŽง",flag_aw="๐Ÿ‡ฆ๐Ÿ‡ผ",stop_button="โน",yum="๐Ÿ˜‹",flag_aq="๐Ÿ‡ฆ๐Ÿ‡ถ",warning="โš ",cheese="๐Ÿง€",ophiuchus="โ›Ž",revolving_hearts="๐Ÿ’ž",one="1โƒฃ",ring="๐Ÿ’",point_right="๐Ÿ‘‰",sheep="๐Ÿ‘",bookmark="๐Ÿ”–",spider_web="๐Ÿ•ธ",eyes="๐Ÿ‘€",flag_ro="๐Ÿ‡ท๐Ÿ‡ด",flag_re="๐Ÿ‡ท๐Ÿ‡ช",flag_rs="๐Ÿ‡ท๐Ÿ‡ธ",sweat_drops="๐Ÿ’ฆ",flag_ru="๐Ÿ‡ท๐Ÿ‡บ",flag_rw="๐Ÿ‡ท๐Ÿ‡ผ",middle_finger="๐Ÿ–•",race_car="๐ŸŽ",evergreen_tree="๐ŸŒฒ",biohazard="โ˜ฃ",girl_tone3="๐Ÿ‘ง๐Ÿฝ",scream_cat="๐Ÿ™€",computer="๐Ÿ’ป",hourglass_flowing_sand="โณ",flag_lb="๐Ÿ‡ฑ๐Ÿ‡ง",tophat="๐ŸŽฉ",clock1230="๐Ÿ•ง",tractor="๐Ÿšœ",u6709="๐Ÿˆถ",u6708="๐Ÿˆท",crying_cat_face="๐Ÿ˜ฟ",angel="๐Ÿ‘ผ",ant="๐Ÿœ",information_desk_person="๐Ÿ’",anger="๐Ÿ’ข",mailbox_with_mail="๐Ÿ“ฌ",pencil2="โœ",wink="๐Ÿ˜‰",thermometer="๐ŸŒก",relaxed="โ˜บ",printer="๐Ÿ–จ",credit_card="๐Ÿ’ณ",checkered_flag="๐Ÿ",family_mmg="๐Ÿ‘จ๐Ÿ‘จ๐Ÿ‘ง",pager="๐Ÿ“Ÿ",family_mmb="๐Ÿ‘จ๐Ÿ‘จ๐Ÿ‘ฆ",radioactive="โ˜ข",fried_shrimp="๐Ÿค",link="๐Ÿ”—",walking="๐Ÿšถ",city_sunset="๐ŸŒ‡",shopping_bags="๐Ÿ›",hockey="๐Ÿ’",arrow_up="โฌ†",gem="๐Ÿ’Ž",negative_squared_cross_mark="โŽ",worried="๐Ÿ˜Ÿ",walking_tone5="๐Ÿšถ๐Ÿฟ",walking_tone1="๐Ÿšถ๐Ÿป",hear_no_evil="๐Ÿ™‰",convenience_store="๐Ÿช",seat="๐Ÿ’บ",girl_tone1="๐Ÿ‘ง๐Ÿป",cloud_rain="๐ŸŒง",girl_tone2="๐Ÿ‘ง๐Ÿผ",girl_tone5="๐Ÿ‘ง๐Ÿฟ",girl_tone4="๐Ÿ‘ง๐Ÿพ",parking="๐Ÿ…ฟ",pisces="โ™“",calendar="๐Ÿ“†",loudspeaker="๐Ÿ“ข",camping="๐Ÿ•",bicyclist="๐Ÿšด",label="๐Ÿท",diamonds="โ™ฆ",older_man_tone1="๐Ÿ‘ด๐Ÿป",older_man_tone3="๐Ÿ‘ด๐Ÿฝ",older_man_tone2="๐Ÿ‘ด๐Ÿผ",older_man_tone5="๐Ÿ‘ด๐Ÿฟ",older_man_tone4="๐Ÿ‘ด๐Ÿพ",microphone2="๐ŸŽ™",raising_hand="๐Ÿ™‹",hot_pepper="๐ŸŒถ",guitar="๐ŸŽธ",tropical_drink="๐Ÿน",upside_down="๐Ÿ™ƒ",restroom="๐Ÿšป",pen_fountain="๐Ÿ–‹",comet="โ˜„",cancer="โ™‹",jeans="๐Ÿ‘–",flag_qa="๐Ÿ‡ถ๐Ÿ‡ฆ",boar="๐Ÿ—",turkey="๐Ÿฆƒ",person_with_blond_hair="๐Ÿ‘ฑ",oden="๐Ÿข",stuck_out_tongue_closed_eyes="๐Ÿ˜",helicopter="๐Ÿš",control_knobs="๐ŸŽ›",performing_arts="๐ŸŽญ",tiger="๐Ÿฏ",foggy="๐ŸŒ",sound="๐Ÿ”‰",flag_cz="๐Ÿ‡จ๐Ÿ‡ฟ",flag_cy="๐Ÿ‡จ๐Ÿ‡พ",flag_cx="๐Ÿ‡จ๐Ÿ‡ฝ",speech_balloon="๐Ÿ’ฌ",seedling="๐ŸŒฑ",flag_cr="๐Ÿ‡จ๐Ÿ‡ท",envelope_with_arrow="๐Ÿ“ฉ",flag_cp="๐Ÿ‡จ๐Ÿ‡ต",flag_cw="๐Ÿ‡จ๐Ÿ‡ผ",flag_cv="๐Ÿ‡จ๐Ÿ‡ป",flag_cu="๐Ÿ‡จ๐Ÿ‡บ",flag_ck="๐Ÿ‡จ๐Ÿ‡ฐ",flag_ci="๐Ÿ‡จ๐Ÿ‡ฎ",flag_ch="๐Ÿ‡จ๐Ÿ‡ญ",flag_co="๐Ÿ‡จ๐Ÿ‡ด",flag_cn="๐Ÿ‡จ๐Ÿ‡ณ",flag_cm="๐Ÿ‡จ๐Ÿ‡ฒ",u5408="๐Ÿˆด",flag_cc="๐Ÿ‡จ๐Ÿ‡จ",flag_ca="๐Ÿ‡จ๐Ÿ‡ฆ",flag_cg="๐Ÿ‡จ๐Ÿ‡ฌ",flag_cf="๐Ÿ‡จ๐Ÿ‡ซ",flag_cd="๐Ÿ‡จ๐Ÿ‡ฉ",purse="๐Ÿ‘›",telephone="โ˜Ž",sleeping="๐Ÿ˜ด",point_down_tone1="๐Ÿ‘‡๐Ÿป",frowning2="โ˜น",point_down_tone2="๐Ÿ‘‡๐Ÿผ",muscle_tone4="๐Ÿ’ช๐Ÿพ",muscle_tone5="๐Ÿ’ช๐Ÿฟ",synagogue="๐Ÿ•",muscle_tone1="๐Ÿ’ช๐Ÿป",muscle_tone2="๐Ÿ’ช๐Ÿผ",muscle_tone3="๐Ÿ’ช๐Ÿฝ",clap_tone5="๐Ÿ‘๐Ÿฟ",clap_tone4="๐Ÿ‘๐Ÿพ",clap_tone1="๐Ÿ‘๐Ÿป",train2="๐Ÿš†",clap_tone2="๐Ÿ‘๐Ÿผ",oil="๐Ÿ›ข",diamond_shape_with_a_dot_inside="๐Ÿ’ ",barber="๐Ÿ’ˆ",metal_tone3="๐Ÿค˜๐Ÿฝ",ice_cream="๐Ÿจ",rowboat_tone4="๐Ÿšฃ๐Ÿพ",burrito="๐ŸŒฏ",metal_tone1="๐Ÿค˜๐Ÿป",joystick="๐Ÿ•น",rowboat_tone1="๐Ÿšฃ๐Ÿป",taxi="๐Ÿš•",u7533="๐Ÿˆธ",racehorse="๐ŸŽ",snowboarder="๐Ÿ‚",thinking="๐Ÿค”",wave_tone1="๐Ÿ‘‹๐Ÿป",wave_tone2="๐Ÿ‘‹๐Ÿผ",wave_tone3="๐Ÿ‘‹๐Ÿฝ",wave_tone4="๐Ÿ‘‹๐Ÿพ",wave_tone5="๐Ÿ‘‹๐Ÿฟ",desktop="๐Ÿ–ฅ",stopwatch="โฑ",pill="๐Ÿ’Š",skier="โ›ท",orange_book="๐Ÿ“™",dart="๐ŸŽฏ",disappointed="๐Ÿ˜ž",grin="๐Ÿ˜",place_of_worship="๐Ÿ›",japanese_goblin="๐Ÿ‘บ",arrows_counterclockwise="๐Ÿ”„",laughing="๐Ÿ˜†",clap="๐Ÿ‘",left_right_arrow="โ†”",japanese_castle="๐Ÿฏ",nail_care_tone4="๐Ÿ’…๐Ÿพ",nail_care_tone5="๐Ÿ’…๐Ÿฟ",nail_care_tone2="๐Ÿ’…๐Ÿผ",nail_care_tone3="๐Ÿ’…๐Ÿฝ",nail_care_tone1="๐Ÿ’…๐Ÿป",raised_hand_tone4="โœ‹๐Ÿพ",raised_hand_tone5="โœ‹๐Ÿฟ",raised_hand_tone1="โœ‹๐Ÿป",raised_hand_tone2="โœ‹๐Ÿผ",raised_hand_tone3="โœ‹๐Ÿฝ",point_left_tone3="๐Ÿ‘ˆ๐Ÿฝ",point_left_tone2="๐Ÿ‘ˆ๐Ÿผ",tanabata_tree="๐ŸŽ‹",point_left_tone5="๐Ÿ‘ˆ๐Ÿฟ",point_left_tone4="๐Ÿ‘ˆ๐Ÿพ",o2="๐Ÿ…พ",knife="๐Ÿ”ช",volcano="๐ŸŒ‹",kissing_heart="๐Ÿ˜˜",on="๐Ÿ”›",ok="๐Ÿ†—",package="๐Ÿ“ฆ",island="๐Ÿ",arrow_right="โžก",chart_with_downwards_trend="๐Ÿ“‰",haircut_tone3="๐Ÿ’‡๐Ÿฝ",wolf="๐Ÿบ",ox="๐Ÿ‚",dagger="๐Ÿ—ก",full_moon_with_face="๐ŸŒ",syringe="๐Ÿ’‰",flag_by="๐Ÿ‡ง๐Ÿ‡พ",flag_bz="๐Ÿ‡ง๐Ÿ‡ฟ",flag_bq="๐Ÿ‡ง๐Ÿ‡ถ",flag_br="๐Ÿ‡ง๐Ÿ‡ท",flag_bs="๐Ÿ‡ง๐Ÿ‡ธ",flag_bt="๐Ÿ‡ง๐Ÿ‡น",flag_bv="๐Ÿ‡ง๐Ÿ‡ป",flag_bw="๐Ÿ‡ง๐Ÿ‡ผ",flag_bh="๐Ÿ‡ง๐Ÿ‡ญ",flag_bi="๐Ÿ‡ง๐Ÿ‡ฎ",flag_bj="๐Ÿ‡ง๐Ÿ‡ฏ",flag_bl="๐Ÿ‡ง๐Ÿ‡ฑ",flag_bm="๐Ÿ‡ง๐Ÿ‡ฒ",flag_bn="๐Ÿ‡ง๐Ÿ‡ณ",flag_bo="๐Ÿ‡ง๐Ÿ‡ด",flag_ba="๐Ÿ‡ง๐Ÿ‡ฆ",flag_bb="๐Ÿ‡ง๐Ÿ‡ง",flag_bd="๐Ÿ‡ง๐Ÿ‡ฉ",flag_be="๐Ÿ‡ง๐Ÿ‡ช",flag_bf="๐Ÿ‡ง๐Ÿ‡ซ",flag_bg="๐Ÿ‡ง๐Ÿ‡ฌ",satellite_orbital="๐Ÿ›ฐ",radio_button="๐Ÿ”˜",arrow_heading_down="โคต",rage="๐Ÿ˜ก",whale2="๐Ÿ‹",vhs="๐Ÿ“ผ",hand_splayed_tone3="๐Ÿ–๐Ÿฝ",strawberry="๐Ÿ“",["non-potable_water"]="๐Ÿšฑ",hand_splayed_tone5="๐Ÿ–๐Ÿฟ",star2="๐ŸŒŸ",toilet="๐Ÿšฝ",ab="๐Ÿ†Ž",cinema="๐ŸŽฆ",floppy_disk="๐Ÿ’พ",princess_tone4="๐Ÿ‘ธ๐Ÿพ",princess_tone5="๐Ÿ‘ธ๐Ÿฟ",princess_tone2="๐Ÿ‘ธ๐Ÿผ",nerd="๐Ÿค“",telephone_receiver="๐Ÿ“ž",princess_tone1="๐Ÿ‘ธ๐Ÿป",arrow_double_down="โฌ",clock1030="๐Ÿ•ฅ",flag_pr="๐Ÿ‡ต๐Ÿ‡ท",flag_ps="๐Ÿ‡ต๐Ÿ‡ธ",poop="๐Ÿ’ฉ",flag_pw="๐Ÿ‡ต๐Ÿ‡ผ",flag_pt="๐Ÿ‡ต๐Ÿ‡น",flag_py="๐Ÿ‡ต๐Ÿ‡พ",pear="๐Ÿ",m="โ“‚",flag_pa="๐Ÿ‡ต๐Ÿ‡ฆ",flag_pf="๐Ÿ‡ต๐Ÿ‡ซ",flag_pg="๐Ÿ‡ต๐Ÿ‡ฌ",flag_pe="๐Ÿ‡ต๐Ÿ‡ช",flag_pk="๐Ÿ‡ต๐Ÿ‡ฐ",flag_ph="๐Ÿ‡ต๐Ÿ‡ญ",flag_pn="๐Ÿ‡ต๐Ÿ‡ณ",flag_pl="๐Ÿ‡ต๐Ÿ‡ฑ",flag_pm="๐Ÿ‡ต๐Ÿ‡ฒ",mask="๐Ÿ˜ท",hushed="๐Ÿ˜ฏ",sunrise_over_mountains="๐ŸŒ„",partly_sunny="โ›…",dollar="๐Ÿ’ต",helmet_with_cross="โ›‘",smoking="๐Ÿšฌ",no_bicycles="๐Ÿšณ",man_with_gua_pi_mao="๐Ÿ‘ฒ",tv="๐Ÿ“บ",open_hands="๐Ÿ‘",rotating_light="๐Ÿšจ",information_desk_person_tone4="๐Ÿ’๐Ÿพ",information_desk_person_tone5="๐Ÿ’๐Ÿฟ",part_alternation_mark="ใ€ฝ",pray_tone5="๐Ÿ™๐Ÿฟ",pray_tone4="๐Ÿ™๐Ÿพ",pray_tone3="๐Ÿ™๐Ÿฝ",pray_tone2="๐Ÿ™๐Ÿผ",pray_tone1="๐Ÿ™๐Ÿป",smile="๐Ÿ˜„",large_blue_circle="๐Ÿ”ต",man_tone4="๐Ÿ‘จ๐Ÿพ",man_tone5="๐Ÿ‘จ๐Ÿฟ",fax="๐Ÿ“ ",woman="๐Ÿ‘ฉ",man_tone1="๐Ÿ‘จ๐Ÿป",man_tone2="๐Ÿ‘จ๐Ÿผ",man_tone3="๐Ÿ‘จ๐Ÿฝ",eye_in_speech_bubble="๐Ÿ‘๐Ÿ—จ",blowfish="๐Ÿก",card_box="๐Ÿ—ƒ",ticket="๐ŸŽซ",ramen="๐Ÿœ",twisted_rightwards_arrows="๐Ÿ”€",swimmer_tone4="๐ŸŠ๐Ÿพ",swimmer_tone5="๐ŸŠ๐Ÿฟ",swimmer_tone1="๐ŸŠ๐Ÿป",swimmer_tone2="๐ŸŠ๐Ÿผ",swimmer_tone3="๐ŸŠ๐Ÿฝ",saxophone="๐ŸŽท",bath_tone1="๐Ÿ›€๐Ÿป",notebook_with_decorative_cover="๐Ÿ“”",bath_tone3="๐Ÿ›€๐Ÿฝ",ten="๐Ÿ”Ÿ",raising_hand_tone4="๐Ÿ™‹๐Ÿพ",tea="๐Ÿต",raising_hand_tone1="๐Ÿ™‹๐Ÿป",raising_hand_tone2="๐Ÿ™‹๐Ÿผ",raising_hand_tone3="๐Ÿ™‹๐Ÿฝ",zero="0โƒฃ",ribbon="๐ŸŽ€",santa_tone1="๐ŸŽ…๐Ÿป",abc="๐Ÿ”ค",clock="๐Ÿ•ฐ",purple_heart="๐Ÿ’œ",bow_tone1="๐Ÿ™‡๐Ÿป",no_smoking="๐Ÿšญ",flag_cl="๐Ÿ‡จ๐Ÿ‡ฑ",surfer="๐Ÿ„",newspaper="๐Ÿ“ฐ",busstop="๐Ÿš",new_moon="๐ŸŒ‘",traffic_light="๐Ÿšฅ",thumbsup="๐Ÿ‘",no_entry="โ›”",name_badge="๐Ÿ“›",classical_building="๐Ÿ›",hamster="๐Ÿน",pick="โ›",two_women_holding_hands="๐Ÿ‘ญ",family_mmbb="๐Ÿ‘จ๐Ÿ‘จ๐Ÿ‘ฆ๐Ÿ‘ฆ",family="๐Ÿ‘ช",rice_cracker="๐Ÿ˜",wind_blowing_face="๐ŸŒฌ",inbox_tray="๐Ÿ“ฅ",tired_face="๐Ÿ˜ซ",carousel_horse="๐ŸŽ ",eye="๐Ÿ‘",poodle="๐Ÿฉ",chestnut="๐ŸŒฐ",slight_smile="๐Ÿ™‚",mailbox_closed="๐Ÿ“ช",cloud_tornado="๐ŸŒช",jack_o_lantern="๐ŸŽƒ",lifter_tone3="๐Ÿ‹๐Ÿฝ",lifter_tone2="๐Ÿ‹๐Ÿผ",lifter_tone1="๐Ÿ‹๐Ÿป",lifter_tone5="๐Ÿ‹๐Ÿฟ",lifter_tone4="๐Ÿ‹๐Ÿพ",nine="9โƒฃ",chocolate_bar="๐Ÿซ",v="โœŒ",man_with_turban_tone4="๐Ÿ‘ณ๐Ÿพ",man_with_turban_tone5="๐Ÿ‘ณ๐Ÿฟ",man_with_turban_tone2="๐Ÿ‘ณ๐Ÿผ",man_with_turban_tone3="๐Ÿ‘ณ๐Ÿฝ",man_with_turban_tone1="๐Ÿ‘ณ๐Ÿป",family_wwbb="๐Ÿ‘ฉ๐Ÿ‘ฉ๐Ÿ‘ฆ๐Ÿ‘ฆ",hamburger="๐Ÿ”",accept="๐Ÿ‰‘",airplane="โœˆ",dress="๐Ÿ‘—",speedboat="๐Ÿšค",ledger="๐Ÿ“’",goat="๐Ÿ",flag_ae="๐Ÿ‡ฆ๐Ÿ‡ช",flag_ad="๐Ÿ‡ฆ๐Ÿ‡ฉ",flag_ag="๐Ÿ‡ฆ๐Ÿ‡ฌ",flag_af="๐Ÿ‡ฆ๐Ÿ‡ซ",flag_ac="๐Ÿ‡ฆ๐Ÿ‡จ",flag_am="๐Ÿ‡ฆ๐Ÿ‡ฒ",flag_al="๐Ÿ‡ฆ๐Ÿ‡ฑ",flag_ao="๐Ÿ‡ฆ๐Ÿ‡ด",flag_ai="๐Ÿ‡ฆ๐Ÿ‡ฎ",flag_au="๐Ÿ‡ฆ๐Ÿ‡บ",flag_at="๐Ÿ‡ฆ๐Ÿ‡น",fork_and_knife="๐Ÿด",fast_forward="โฉ",flag_as="๐Ÿ‡ฆ๐Ÿ‡ธ",flag_ar="๐Ÿ‡ฆ๐Ÿ‡ท",cow2="๐Ÿ„",flag_ax="๐Ÿ‡ฆ๐Ÿ‡ฝ",flag_az="๐Ÿ‡ฆ๐Ÿ‡ฟ",a="๐Ÿ…ฐ",volleyball="๐Ÿ",dragon="๐Ÿ‰",wrench="๐Ÿ”ง",point_up_2="๐Ÿ‘†",egg="๐Ÿณ",small_red_triangle="๐Ÿ”บ",soon="๐Ÿ”œ",bow_tone4="๐Ÿ™‡๐Ÿพ",joy_cat="๐Ÿ˜น",pray="๐Ÿ™",dark_sunglasses="๐Ÿ•ถ",rugby_football="๐Ÿ‰",soccer="โšฝ",dolls="๐ŸŽŽ",monkey_face="๐Ÿต",clap_tone3="๐Ÿ‘๐Ÿฝ",bar_chart="๐Ÿ“Š",european_castle="๐Ÿฐ",military_medal="๐ŸŽ–",frame_photo="๐Ÿ–ผ",rice_ball="๐Ÿ™",trolleybus="๐ŸšŽ",older_woman="๐Ÿ‘ต",information_source="โ„น",postal_horn="๐Ÿ“ฏ",house="๐Ÿ ",fish="๐ŸŸ",bride_with_veil="๐Ÿ‘ฐ",fist="โœŠ",lipstick="๐Ÿ’„",fountain="โ›ฒ",cyclone="๐ŸŒ€",thumbsdown_tone2="๐Ÿ‘Ž๐Ÿผ",thumbsdown_tone3="๐Ÿ‘Ž๐Ÿฝ",thumbsdown_tone1="๐Ÿ‘Ž๐Ÿป",thumbsdown_tone4="๐Ÿ‘Ž๐Ÿพ",thumbsdown_tone5="๐Ÿ‘Ž๐Ÿฟ",cookie="๐Ÿช",heartbeat="๐Ÿ’“",blush="๐Ÿ˜Š",fire_engine="๐Ÿš’",feet="๐Ÿพ",horse="๐Ÿด",blossom="๐ŸŒผ",crossed_swords="โš”",station="๐Ÿš‰",clock730="๐Ÿ•ข",banana="๐ŸŒ",relieved="๐Ÿ˜Œ",hotel="๐Ÿจ",park="๐Ÿž",aerial_tramway="๐Ÿšก",flag_sd="๐Ÿ‡ธ๐Ÿ‡ฉ",panda_face="๐Ÿผ",b="๐Ÿ…ฑ",flag_sx="๐Ÿ‡ธ๐Ÿ‡ฝ",six_pointed_star="๐Ÿ”ฏ",shaved_ice="๐Ÿง",chipmunk="๐Ÿฟ",mountain="โ›ฐ",koala="๐Ÿจ",white_small_square="โ–ซ",open_hands_tone2="๐Ÿ‘๐Ÿผ",open_hands_tone3="๐Ÿ‘๐Ÿฝ",u55b6="๐Ÿˆบ",open_hands_tone1="๐Ÿ‘๐Ÿป",open_hands_tone4="๐Ÿ‘๐Ÿพ",open_hands_tone5="๐Ÿ‘๐Ÿฟ",baby_tone5="๐Ÿ‘ถ๐Ÿฟ",baby_tone4="๐Ÿ‘ถ๐Ÿพ",baby_tone3="๐Ÿ‘ถ๐Ÿฝ",baby_tone2="๐Ÿ‘ถ๐Ÿผ",baby_tone1="๐Ÿ‘ถ๐Ÿป",chart="๐Ÿ’น",beach_umbrella="โ›ฑ",basketball_player_tone5="โ›น๐Ÿฟ",basketball_player_tone4="โ›น๐Ÿพ",basketball_player_tone1="โ›น๐Ÿป",basketball_player_tone3="โ›น๐Ÿฝ",basketball_player_tone2="โ›น๐Ÿผ",mans_shoe="๐Ÿ‘ž",shinto_shrine="โ›ฉ",ideograph_advantage="๐Ÿ‰",airplane_arriving="๐Ÿ›ฌ",golf="โ›ณ",minidisc="๐Ÿ’ฝ",hugging="๐Ÿค—",crayon="๐Ÿ–",point_down="๐Ÿ‘‡",copyright="ยฉ",person_with_pouting_face_tone2="๐Ÿ™Ž๐Ÿผ",person_with_pouting_face_tone3="๐Ÿ™Ž๐Ÿฝ",person_with_pouting_face_tone1="๐Ÿ™Ž๐Ÿป",person_with_pouting_face_tone4="๐Ÿ™Ž๐Ÿพ",person_with_pouting_face_tone5="๐Ÿ™Ž๐Ÿฟ",busts_in_silhouette="๐Ÿ‘ฅ",alarm_clock="โฐ",couplekiss="๐Ÿ’",circus_tent="๐ŸŽช",sunny="โ˜€",incoming_envelope="๐Ÿ“จ",yellow_heart="๐Ÿ’›",cry="๐Ÿ˜ข",x="โŒ",arrow_up_small="๐Ÿ”ผ",art="๐ŸŽจ",surfer_tone1="๐Ÿ„๐Ÿป",bride_with_veil_tone4="๐Ÿ‘ฐ๐Ÿพ",bride_with_veil_tone5="๐Ÿ‘ฐ๐Ÿฟ",bride_with_veil_tone2="๐Ÿ‘ฐ๐Ÿผ",bride_with_veil_tone3="๐Ÿ‘ฐ๐Ÿฝ",bride_with_veil_tone1="๐Ÿ‘ฐ๐Ÿป",hibiscus="๐ŸŒบ",black_joker="๐Ÿƒ",raised_hand="โœ‹",no_mouth="๐Ÿ˜ถ",basketball_player="โ›น",champagne="๐Ÿพ",no_entry_sign="๐Ÿšซ",older_man="๐Ÿ‘ด",moyai="๐Ÿ—ฟ",mailbox="๐Ÿ“ซ",slight_frown="๐Ÿ™",statue_of_liberty="๐Ÿ—ฝ",mega="๐Ÿ“ฃ",eggplant="๐Ÿ†",rose="๐ŸŒน",bell="๐Ÿ””",battery="๐Ÿ”‹",wastebasket="๐Ÿ—‘",dancer="๐Ÿ’ƒ",page_facing_up="๐Ÿ“„",church="โ›ช",underage="๐Ÿ”ž",secret="ใŠ™",clock430="๐Ÿ•Ÿ",fork_knife_plate="๐Ÿฝ",u7981="๐Ÿˆฒ",fire="๐Ÿ”ฅ",cold_sweat="๐Ÿ˜ฐ",flag_er="๐Ÿ‡ช๐Ÿ‡ท",family_mwgg="๐Ÿ‘จ๐Ÿ‘ฉ๐Ÿ‘ง๐Ÿ‘ง",heart_eyes="๐Ÿ˜",guardsman_tone1="๐Ÿ’‚๐Ÿป",guardsman_tone2="๐Ÿ’‚๐Ÿผ",guardsman_tone3="๐Ÿ’‚๐Ÿฝ",guardsman_tone4="๐Ÿ’‚๐Ÿพ",earth_africa="๐ŸŒ",arrow_right_hook="โ†ช",spy_tone2="๐Ÿ•ต๐Ÿผ",closed_umbrella="๐ŸŒ‚",bikini="๐Ÿ‘™",vertical_traffic_light="๐Ÿšฆ",kissing="๐Ÿ˜—",loop="โžฟ",potable_water="๐Ÿšฐ",pound="๐Ÿ’ท",["fleur-de-lis"]="โšœ",key2="๐Ÿ—",heavy_dollar_sign="๐Ÿ’ฒ",shamrock="โ˜˜",boy_tone4="๐Ÿ‘ฆ๐Ÿพ",shirt="๐Ÿ‘•",kimono="๐Ÿ‘˜",left_luggage="๐Ÿ›…",meat_on_bone="๐Ÿ–",ok_woman_tone4="๐Ÿ™†๐Ÿพ",ok_woman_tone5="๐Ÿ™†๐Ÿฟ",arrow_heading_up="โคด",calendar_spiral="๐Ÿ—“",snail="๐ŸŒ",ok_woman_tone1="๐Ÿ™†๐Ÿป",arrow_down_small="๐Ÿ”ฝ",leopard="๐Ÿ†",paperclips="๐Ÿ–‡",cityscape="๐Ÿ™",woman_tone1="๐Ÿ‘ฉ๐Ÿป",slot_machine="๐ŸŽฐ",woman_tone3="๐Ÿ‘ฉ๐Ÿฝ",woman_tone4="๐Ÿ‘ฉ๐Ÿพ",woman_tone5="๐Ÿ‘ฉ๐Ÿฟ",euro="๐Ÿ’ถ",musical_score="๐ŸŽผ",triangular_ruler="๐Ÿ“",flags="๐ŸŽ",five="5โƒฃ",love_hotel="๐Ÿฉ",hotdog="๐ŸŒญ",speak_no_evil="๐Ÿ™Š",eyeglasses="๐Ÿ‘“",dancer_tone4="๐Ÿ’ƒ๐Ÿพ",dancer_tone5="๐Ÿ’ƒ๐Ÿฟ",vulcan_tone4="๐Ÿ––๐Ÿพ",bridge_at_night="๐ŸŒ‰",writing_hand_tone1="โœ๐Ÿป",couch="๐Ÿ›‹",vulcan_tone1="๐Ÿ––๐Ÿป",vulcan_tone2="๐Ÿ––๐Ÿผ",vulcan_tone3="๐Ÿ––๐Ÿฝ",womans_hat="๐Ÿ‘’",sandal="๐Ÿ‘ก",cherries="๐Ÿ’",full_moon="๐ŸŒ•",flag_om="๐Ÿ‡ด๐Ÿ‡ฒ",play_pause="โฏ",couple="๐Ÿ‘ซ",money_mouth="๐Ÿค‘",womans_clothes="๐Ÿ‘š",globe_with_meridians="๐ŸŒ",bath_tone5="๐Ÿ›€๐Ÿฟ",bangbang="โ€ผ",stuck_out_tongue_winking_eye="๐Ÿ˜œ",heart="โค",bamboo="๐ŸŽ",mahjong="๐Ÿ€„",waning_gibbous_moon="๐ŸŒ–",back="๐Ÿ”™",point_up_2_tone4="๐Ÿ‘†๐Ÿพ",point_up_2_tone5="๐Ÿ‘†๐Ÿฟ",lips="๐Ÿ‘„",point_up_2_tone1="๐Ÿ‘†๐Ÿป",point_up_2_tone2="๐Ÿ‘†๐Ÿผ",point_up_2_tone3="๐Ÿ‘†๐Ÿฝ",candle="๐Ÿ•ฏ",middle_finger_tone3="๐Ÿ–•๐Ÿฝ",middle_finger_tone2="๐Ÿ–•๐Ÿผ",middle_finger_tone1="๐Ÿ–•๐Ÿป",middle_finger_tone5="๐Ÿ–•๐Ÿฟ",middle_finger_tone4="๐Ÿ–•๐Ÿพ",heavy_minus_sign="โž–",nose="๐Ÿ‘ƒ",zzz="๐Ÿ’ค",stew="๐Ÿฒ",santa="๐ŸŽ…",tropical_fish="๐Ÿ ",point_up_tone1="โ˜๐Ÿป",point_up_tone3="โ˜๐Ÿฝ",point_up_tone2="โ˜๐Ÿผ",point_up_tone5="โ˜๐Ÿฟ",point_up_tone4="โ˜๐Ÿพ",field_hockey="๐Ÿ‘",school_satchel="๐ŸŽ’",womens="๐Ÿšบ",baby_symbol="๐Ÿšผ",baby_chick="๐Ÿค",ok_hand_tone2="๐Ÿ‘Œ๐Ÿผ",ok_hand_tone3="๐Ÿ‘Œ๐Ÿฝ",ok_hand_tone1="๐Ÿ‘Œ๐Ÿป",ok_hand_tone4="๐Ÿ‘Œ๐Ÿพ",ok_hand_tone5="๐Ÿ‘Œ๐Ÿฟ",family_mmgb="๐Ÿ‘จ๐Ÿ‘จ๐Ÿ‘ง๐Ÿ‘ฆ",last_quarter_moon="๐ŸŒ—",tada="๐ŸŽ‰",clock530="๐Ÿ• ",question="โ“",registered="ยฎ",level_slider="๐ŸŽš",black_circle="โšซ",atom="โš›",penguin="๐Ÿง",electric_plug="๐Ÿ”Œ",skull="๐Ÿ’€",kiss_mm="๐Ÿ‘จโค๐Ÿ’‹๐Ÿ‘จ",walking_tone4="๐Ÿšถ๐Ÿพ",fries="๐ŸŸ",up="๐Ÿ†™",walking_tone3="๐Ÿšถ๐Ÿฝ",walking_tone2="๐Ÿšถ๐Ÿผ",athletic_shoe="๐Ÿ‘Ÿ",hatched_chick="๐Ÿฅ",black_nib="โœ’",black_large_square="โฌ›",bow_and_arrow="๐Ÿน",rainbow="๐ŸŒˆ",metal_tone5="๐Ÿค˜๐Ÿฟ",metal_tone4="๐Ÿค˜๐Ÿพ",lemon="๐Ÿ‹",metal_tone2="๐Ÿค˜๐Ÿผ",peach="๐Ÿ‘",peace="โ˜ฎ",steam_locomotive="๐Ÿš‚",oncoming_bus="๐Ÿš",heart_eyes_cat="๐Ÿ˜ป",smiley="๐Ÿ˜ƒ",haircut_tone1="๐Ÿ’‡๐Ÿป",haircut_tone2="๐Ÿ’‡๐Ÿผ",u6e80="๐Ÿˆต",haircut_tone4="๐Ÿ’‡๐Ÿพ",haircut_tone5="๐Ÿ’‡๐Ÿฟ",black_medium_square="โ—ผ",closed_book="๐Ÿ“•",desert="๐Ÿœ",expressionless="๐Ÿ˜‘",dvd="๐Ÿ“€",construction_worker_tone2="๐Ÿ‘ท๐Ÿผ",construction_worker_tone3="๐Ÿ‘ท๐Ÿฝ",construction_worker_tone4="๐Ÿ‘ท๐Ÿพ",construction_worker_tone5="๐Ÿ‘ท๐Ÿฟ",mag_right="๐Ÿ”Ž",bento="๐Ÿฑ",scroll="๐Ÿ“œ",flag_nl="๐Ÿ‡ณ๐Ÿ‡ฑ",flag_no="๐Ÿ‡ณ๐Ÿ‡ด",flag_ni="๐Ÿ‡ณ๐Ÿ‡ฎ",european_post_office="๐Ÿค",flag_ne="๐Ÿ‡ณ๐Ÿ‡ช",flag_nf="๐Ÿ‡ณ๐Ÿ‡ซ",flag_ng="๐Ÿ‡ณ๐Ÿ‡ฌ",flag_na="๐Ÿ‡ณ๐Ÿ‡ฆ",flag_nc="๐Ÿ‡ณ๐Ÿ‡จ",alien="๐Ÿ‘ฝ",first_quarter_moon_with_face="๐ŸŒ›",flag_nz="๐Ÿ‡ณ๐Ÿ‡ฟ",flag_nu="๐Ÿ‡ณ๐Ÿ‡บ",golfer="๐ŸŒ",flag_np="๐Ÿ‡ณ๐Ÿ‡ต",flag_nr="๐Ÿ‡ณ๐Ÿ‡ท",anguished="๐Ÿ˜ง",mosque="๐Ÿ•Œ",point_left_tone1="๐Ÿ‘ˆ๐Ÿป",ear_tone1="๐Ÿ‘‚๐Ÿป",ear_tone2="๐Ÿ‘‚๐Ÿผ",ear_tone3="๐Ÿ‘‚๐Ÿฝ",ear_tone4="๐Ÿ‘‚๐Ÿพ",ear_tone5="๐Ÿ‘‚๐Ÿฟ",eight_pointed_black_star="โœด",wave="๐Ÿ‘‹",runner_tone5="๐Ÿƒ๐Ÿฟ",runner_tone4="๐Ÿƒ๐Ÿพ",runner_tone3="๐Ÿƒ๐Ÿฝ",runner_tone2="๐Ÿƒ๐Ÿผ",runner_tone1="๐Ÿƒ๐Ÿป",railway_car="๐Ÿšƒ",notes="๐ŸŽถ",no_good="๐Ÿ™…",trackball="๐Ÿ–ฒ",spaghetti="๐Ÿ",love_letter="๐Ÿ’Œ",clipboard="๐Ÿ“‹",baby_bottle="๐Ÿผ",bird="๐Ÿฆ",card_index="๐Ÿ“‡",punch="๐Ÿ‘Š",leo="โ™Œ",house_with_garden="๐Ÿก",family_wwgg="๐Ÿ‘ฉ๐Ÿ‘ฉ๐Ÿ‘ง๐Ÿ‘ง",family_wwgb="๐Ÿ‘ฉ๐Ÿ‘ฉ๐Ÿ‘ง๐Ÿ‘ฆ",see_no_evil="๐Ÿ™ˆ",metro="๐Ÿš‡",popcorn="๐Ÿฟ",apple="๐ŸŽ",scales="โš–",sleeping_accommodation="๐Ÿ›Œ",clock230="๐Ÿ•",tools="๐Ÿ› ",cloud="โ˜",honey_pot="๐Ÿฏ",ballot_box="๐Ÿ—ณ",frog="๐Ÿธ",camera="๐Ÿ“ท",crab="๐Ÿฆ€",video_camera="๐Ÿ“น",pencil="๐Ÿ“",thunder_cloud_rain="โ›ˆ",mountain_bicyclist="๐Ÿšต",tangerine="๐ŸŠ",train="๐Ÿš‹",rabbit="๐Ÿฐ",baby="๐Ÿ‘ถ",palm_tree="๐ŸŒด",capital_abcd="๐Ÿ” ",put_litter_in_its_place="๐Ÿšฎ",coffin="โšฐ",abcd="๐Ÿ”ก",lock="๐Ÿ”’",pig2="๐Ÿ–",family_mwg="๐Ÿ‘จ๐Ÿ‘ฉ๐Ÿ‘ง",point_right_tone5="๐Ÿ‘‰๐Ÿฟ",trumpet="๐ŸŽบ",film_frames="๐ŸŽž",six="6โƒฃ",leftwards_arrow_with_hook="โ†ฉ",earth_asia="๐ŸŒ",heavy_check_mark="โœ”",notebook="๐Ÿ““",taco="๐ŸŒฎ",tomato="๐Ÿ…",robot="๐Ÿค–",mute="๐Ÿ”‡",symbols="๐Ÿ”ฃ",motorcycle="๐Ÿ",thermometer_face="๐Ÿค’",paperclip="๐Ÿ“Ž",moneybag="๐Ÿ’ฐ",neutral_face="๐Ÿ˜",white_sun_rain_cloud="๐ŸŒฆ",snake="๐Ÿ",kiss="๐Ÿ’‹",blue_car="๐Ÿš™",confetti_ball="๐ŸŽŠ",tram="๐ŸšŠ",repeat_one="๐Ÿ”‚",smiley_cat="๐Ÿ˜บ",beginner="๐Ÿ”ฐ",mobile_phone_off="๐Ÿ“ด",books="๐Ÿ“š",["8ball"]="๐ŸŽฑ",cocktail="๐Ÿธ",flag_ge="๐Ÿ‡ฌ๐Ÿ‡ช",horse_racing_tone2="๐Ÿ‡๐Ÿผ",flag_mh="๐Ÿ‡ฒ๐Ÿ‡ญ",flag_mk="๐Ÿ‡ฒ๐Ÿ‡ฐ",flag_mm="๐Ÿ‡ฒ๐Ÿ‡ฒ",flag_ml="๐Ÿ‡ฒ๐Ÿ‡ฑ",flag_mo="๐Ÿ‡ฒ๐Ÿ‡ด",flag_mn="๐Ÿ‡ฒ๐Ÿ‡ณ",flag_ma="๐Ÿ‡ฒ๐Ÿ‡ฆ",flag_mc="๐Ÿ‡ฒ๐Ÿ‡จ",flag_me="๐Ÿ‡ฒ๐Ÿ‡ช",flag_md="๐Ÿ‡ฒ๐Ÿ‡ฉ",flag_mg="๐Ÿ‡ฒ๐Ÿ‡ฌ",flag_mf="๐Ÿ‡ฒ๐Ÿ‡ซ",flag_my="๐Ÿ‡ฒ๐Ÿ‡พ",flag_mx="๐Ÿ‡ฒ๐Ÿ‡ฝ",flag_mz="๐Ÿ‡ฒ๐Ÿ‡ฟ",mountain_snow="๐Ÿ”",flag_mp="๐Ÿ‡ฒ๐Ÿ‡ต",flag_ms="๐Ÿ‡ฒ๐Ÿ‡ธ",flag_mr="๐Ÿ‡ฒ๐Ÿ‡ท",flag_mu="๐Ÿ‡ฒ๐Ÿ‡บ",flag_mt="๐Ÿ‡ฒ๐Ÿ‡น",flag_mw="๐Ÿ‡ฒ๐Ÿ‡ผ",flag_mv="๐Ÿ‡ฒ๐Ÿ‡ป",timer="โฒ",passport_control="๐Ÿ›‚",small_blue_diamond="๐Ÿ”น",lion_face="๐Ÿฆ",white_check_mark="โœ…",bouquet="๐Ÿ’",track_previous="โฎ",monkey="๐Ÿ’",tone4="๐Ÿพ",closed_lock_with_key="๐Ÿ”",family_wwb="๐Ÿ‘ฉ๐Ÿ‘ฉ๐Ÿ‘ฆ",family_wwg="๐Ÿ‘ฉ๐Ÿ‘ฉ๐Ÿ‘ง",tone1="๐Ÿป",crescent_moon="๐ŸŒ™",shell="๐Ÿš",gear="โš™",tone2="๐Ÿผ",small_red_triangle_down="๐Ÿ”ป",nut_and_bolt="๐Ÿ”ฉ",umbrella2="โ˜‚",unamused="๐Ÿ˜’",fuelpump="โ›ฝ",bed="๐Ÿ›",bee="๐Ÿ",round_pushpin="๐Ÿ“",flag_white="๐Ÿณ",microphone="๐ŸŽค",bus="๐ŸšŒ",eight="8โƒฃ",handbag="๐Ÿ‘œ",medal="๐Ÿ…",arrows_clockwise="๐Ÿ”ƒ",urn="โšฑ",bookmark_tabs="๐Ÿ“‘",new_moon_with_face="๐ŸŒš",fallen_leaf="๐Ÿ‚",horse_racing="๐Ÿ‡",chicken="๐Ÿ”",ear="๐Ÿ‘‚",wheel_of_dharma="โ˜ธ",arrow_lower_right="โ†˜",man_with_gua_pi_mao_tone5="๐Ÿ‘ฒ๐Ÿฟ",scorpion="๐Ÿฆ‚",waning_crescent_moon="๐ŸŒ˜",man_with_gua_pi_mao_tone2="๐Ÿ‘ฒ๐Ÿผ",man_with_gua_pi_mao_tone1="๐Ÿ‘ฒ๐Ÿป",bug="๐Ÿ›",virgo="โ™",libra="โ™Ž",angel_tone1="๐Ÿ‘ผ๐Ÿป",angel_tone3="๐Ÿ‘ผ๐Ÿฝ",angel_tone2="๐Ÿ‘ผ๐Ÿผ",angel_tone5="๐Ÿ‘ผ๐Ÿฟ",sagittarius="โ™",bear="๐Ÿป",information_desk_person_tone3="๐Ÿ’๐Ÿฝ",no_mobile_phones="๐Ÿ“ต",hand_splayed="๐Ÿ–",motorboat="๐Ÿ›ฅ",calling="๐Ÿ“ฒ",interrobang="โ‰",oncoming_taxi="๐Ÿš–",flag_lt="๐Ÿ‡ฑ๐Ÿ‡น",flag_lu="๐Ÿ‡ฑ๐Ÿ‡บ",flag_lr="๐Ÿ‡ฑ๐Ÿ‡ท",flag_ls="๐Ÿ‡ฑ๐Ÿ‡ธ",flag_ly="๐Ÿ‡ฑ๐Ÿ‡พ",bellhop="๐Ÿ›Ž",arrow_down="โฌ‡",flag_lc="๐Ÿ‡ฑ๐Ÿ‡จ",flag_la="๐Ÿ‡ฑ๐Ÿ‡ฆ",flag_lk="๐Ÿ‡ฑ๐Ÿ‡ฐ",flag_li="๐Ÿ‡ฑ๐Ÿ‡ฎ",ferris_wheel="๐ŸŽก",hand_splayed_tone2="๐Ÿ–๐Ÿผ",large_blue_diamond="๐Ÿ”ท",cat2="๐Ÿˆ",icecream="๐Ÿฆ",tent="โ›บ",joy="๐Ÿ˜‚",hand_splayed_tone4="๐Ÿ–๐Ÿพ",file_cabinet="๐Ÿ—„",key="๐Ÿ”‘",weary="๐Ÿ˜ฉ",bath_tone2="๐Ÿ›€๐Ÿผ",flag_lv="๐Ÿ‡ฑ๐Ÿ‡ป",low_brightness="๐Ÿ”…",rowboat_tone5="๐Ÿšฃ๐Ÿฟ",rowboat_tone2="๐Ÿšฃ๐Ÿผ",rowboat_tone3="๐Ÿšฃ๐Ÿฝ",four_leaf_clover="๐Ÿ€",space_invader="๐Ÿ‘พ",cl="๐Ÿ†‘",cd="๐Ÿ’ฟ",bath_tone4="๐Ÿ›€๐Ÿพ",flag_za="๐Ÿ‡ฟ๐Ÿ‡ฆ",swimmer="๐ŸŠ",wavy_dash="ใ€ฐ",flag_zm="๐Ÿ‡ฟ๐Ÿ‡ฒ",flag_zw="๐Ÿ‡ฟ๐Ÿ‡ผ",raised_hands_tone5="๐Ÿ™Œ๐Ÿฟ",two_hearts="๐Ÿ’•",bulb="๐Ÿ’ก",cop_tone4="๐Ÿ‘ฎ๐Ÿพ",cop_tone5="๐Ÿ‘ฎ๐Ÿฟ",cop_tone2="๐Ÿ‘ฎ๐Ÿผ",cop_tone3="๐Ÿ‘ฎ๐Ÿฝ",cop_tone1="๐Ÿ‘ฎ๐Ÿป",open_file_folder="๐Ÿ“‚",homes="๐Ÿ˜",raised_hands_tone2="๐Ÿ™Œ๐Ÿผ",fearful="๐Ÿ˜จ",grinning="๐Ÿ˜€",bow_tone5="๐Ÿ™‡๐Ÿฟ",santa_tone3="๐ŸŽ…๐Ÿฝ",santa_tone2="๐ŸŽ…๐Ÿผ",santa_tone5="๐ŸŽ…๐Ÿฟ",santa_tone4="๐ŸŽ…๐Ÿพ",bow_tone2="๐Ÿ™‡๐Ÿผ",bow_tone3="๐Ÿ™‡๐Ÿฝ",bathtub="๐Ÿ›",ping_pong="๐Ÿ“",u5272="๐Ÿˆน",rooster="๐Ÿ“",vs="๐Ÿ†š",bullettrain_front="๐Ÿš…",airplane_small="๐Ÿ›ฉ",white_circle="โšช",balloon="๐ŸŽˆ",cross="โœ",princess_tone3="๐Ÿ‘ธ๐Ÿฝ",speaker="๐Ÿ”ˆ",zipper_mouth="๐Ÿค",u6307="๐Ÿˆฏ",whale="๐Ÿณ",pensive="๐Ÿ˜”",signal_strength="๐Ÿ“ถ",muscle="๐Ÿ’ช",rocket="๐Ÿš€",camel="๐Ÿซ",boot="๐Ÿ‘ข",flashlight="๐Ÿ”ฆ",spy_tone4="๐Ÿ•ต๐Ÿพ",spy_tone5="๐Ÿ•ต๐Ÿฟ",ski="๐ŸŽฟ",spy_tone3="๐Ÿ•ต๐Ÿฝ",musical_keyboard="๐ŸŽน",spy_tone1="๐Ÿ•ต๐Ÿป",rolling_eyes="๐Ÿ™„",clock1="๐Ÿ•",clock2="๐Ÿ•‘",clock3="๐Ÿ•’",clock4="๐Ÿ•“",clock5="๐Ÿ•”",clock6="๐Ÿ••",clock7="๐Ÿ•–",clock8="๐Ÿ•—",clock9="๐Ÿ•˜",doughnut="๐Ÿฉ",dancer_tone1="๐Ÿ’ƒ๐Ÿป",dancer_tone2="๐Ÿ’ƒ๐Ÿผ",dancer_tone3="๐Ÿ’ƒ๐Ÿฝ",candy="๐Ÿฌ",two_men_holding_hands="๐Ÿ‘ฌ",badminton="๐Ÿธ",bust_in_silhouette="๐Ÿ‘ค",writing_hand_tone2="โœ๐Ÿผ",sunflower="๐ŸŒป",["e-mail"]="๐Ÿ“ง",chains="โ›“",kissing_smiling_eyes="๐Ÿ˜™",fish_cake="๐Ÿฅ",no_pedestrians="๐Ÿšท",v_tone4="โœŒ๐Ÿพ",v_tone5="โœŒ๐Ÿฟ",v_tone1="โœŒ๐Ÿป",v_tone2="โœŒ๐Ÿผ",v_tone3="โœŒ๐Ÿฝ",arrow_backward="โ—€",clock12="๐Ÿ•›",clock10="๐Ÿ•™",clock11="๐Ÿ•š",sweat="๐Ÿ˜“",mountain_railway="๐Ÿšž",tongue="๐Ÿ‘…",black_square_button="๐Ÿ”ฒ",do_not_litter="๐Ÿšฏ",nose_tone4="๐Ÿ‘ƒ๐Ÿพ",nose_tone5="๐Ÿ‘ƒ๐Ÿฟ",nose_tone2="๐Ÿ‘ƒ๐Ÿผ",nose_tone3="๐Ÿ‘ƒ๐Ÿฝ",nose_tone1="๐Ÿ‘ƒ๐Ÿป",horse_racing_tone5="๐Ÿ‡๐Ÿฟ",horse_racing_tone4="๐Ÿ‡๐Ÿพ",horse_racing_tone3="๐Ÿ‡๐Ÿฝ",ok_hand="๐Ÿ‘Œ",horse_racing_tone1="๐Ÿ‡๐Ÿป",custard="๐Ÿฎ",rowboat="๐Ÿšฃ",white_sun_small_cloud="๐ŸŒค",flag_kr="๐Ÿ‡ฐ๐Ÿ‡ท",cricket="๐Ÿ",flag_kp="๐Ÿ‡ฐ๐Ÿ‡ต",flag_kw="๐Ÿ‡ฐ๐Ÿ‡ผ",flag_kz="๐Ÿ‡ฐ๐Ÿ‡ฟ",flag_ky="๐Ÿ‡ฐ๐Ÿ‡พ",construction="๐Ÿšง",flag_kg="๐Ÿ‡ฐ๐Ÿ‡ฌ",flag_ke="๐Ÿ‡ฐ๐Ÿ‡ช",flag_ki="๐Ÿ‡ฐ๐Ÿ‡ฎ",flag_kh="๐Ÿ‡ฐ๐Ÿ‡ญ",flag_kn="๐Ÿ‡ฐ๐Ÿ‡ณ",flag_km="๐Ÿ‡ฐ๐Ÿ‡ฒ",cake="๐Ÿฐ",flag_wf="๐Ÿ‡ผ๐Ÿ‡ซ",mortar_board="๐ŸŽ“",pig="๐Ÿท",flag_ws="๐Ÿ‡ผ๐Ÿ‡ธ",person_frowning="๐Ÿ™",arrow_upper_right="โ†—",book="๐Ÿ“–",clock1130="๐Ÿ•ฆ",boom="๐Ÿ’ฅ",["repeat"]="๐Ÿ”",star="โญ",rabbit2="๐Ÿ‡",footprints="๐Ÿ‘ฃ",ghost="๐Ÿ‘ป",droplet="๐Ÿ’ง",vibration_mode="๐Ÿ“ณ",flag_ye="๐Ÿ‡พ๐Ÿ‡ช",flag_yt="๐Ÿ‡พ๐Ÿ‡น",
}
--- translate the string to emoji
+-- translate emoji tags in the string, e.g. "${beer}" => unicode emoji
+--
+-- @param str the string with emoji tags
+-- @return the translated string
+--
function emoji.translate(str)
-- translate it
diff --git a/xmake/core/base/fwatcher.lua b/xmake/core/base/fwatcher.lua
index 3844f5877..9fc04722e 100644
--- a/xmake/core/base/fwatcher.lua
+++ b/xmake/core/base/fwatcher.lua
@@ -153,17 +153,30 @@ function _instance:_ensure_opened()
return true
end
--- add watchdir
+-- add a directory to watch
+--
+-- @param watchdir the directory path to watch
+-- @param opt the options, e.g. {recursion = true}
+-- @return true on success, or false and error info
+--
function fwatcher.add(watchdir, opt)
return _instance:add(watchdir, opt)
end
--- remove watchdir
+-- remove a directory from watch
+--
+-- @param watchdir the directory path to remove
+-- @return true on success, or false and error info
+--
function fwatcher.remove(watchdir)
return _instance:remove(watchdir)
end
--- wait event
+-- wait for file system event
+--
+-- @param timeout the timeout in milliseconds, -1 for infinite
+-- @return the event, or nil on timeout
+--
function fwatcher.wait(timeout)
return _instance:wait(timeout)
end
diff --git a/xmake/core/base/global.lua b/xmake/core/base/global.lua
index c8284b8a0..e2a5aeb25 100644
--- a/xmake/core/base/global.lua
+++ b/xmake/core/base/global.lua
@@ -28,7 +28,11 @@ local path = require("base/path")
local utils = require("base/utils")
local option = require("base/option")
--- get the current given configure
+-- get the global configuration value
+--
+-- @param name the configuration name
+-- @return the configuration value
+--
function global.get(name)
local value = nil
if global._CONFIGS then
@@ -91,7 +95,10 @@ function global.filepath()
return path.join(global.directory(), xmake._NAME .. ".conf")
end
--- get the global configure directory
+-- get the global configuration directory, e.g. "~/.xmake"
+--
+-- @return the global directory path
+--
function global.directory()
if global._DIRECTORY == nil then
local name = "." .. xmake._NAME
@@ -115,7 +122,10 @@ function global.cachedir()
return global.get("cachedir") or path.join(global.directory(), "cache")
end
--- load the global configuration
+-- load the global configuration from file
+--
+-- @return true on success
+--
function global.load()
-- load configure from the file first
@@ -138,7 +148,10 @@ function global.load()
return true
end
--- save the global configure
+-- save the global configuration to file
+--
+-- @return true on success, or false and error info
+--
function global.save()
-- the options
diff --git a/xmake/core/base/graph.lua b/xmake/core/base/graph.lua
index be0035394..bbaee4d58 100644
--- a/xmake/core/base/graph.lua
+++ b/xmake/core/base/graph.lua
@@ -549,7 +549,11 @@ function graph:_partial_topo_sort_recompute_dirty()
self._partial_topo_dirty = false
end
--- new graph
+-- create a new graph
+--
+-- @param directed create a directed graph if true, undirected if false
+-- @return the graph instance
+--
function graph.new(directed)
local gh = graph {directed}
gh:clear()
diff --git a/xmake/core/base/hash.lua b/xmake/core/base/hash.lua
index d08a7d93b..4b37946e8 100644
--- a/xmake/core/base/hash.lua
+++ b/xmake/core/base/hash.lua
@@ -35,7 +35,11 @@ hash._rand32 = hash._rand32 or hash.rand32
hash._rand64 = hash._rand64 or hash.rand64
hash._rand128 = hash._rand128 or hash.rand128
--- generate md5 from the given file or data
+-- generate md5 hash from the given file or data
+--
+-- @param file_or_data the file path, data string, or bytes object
+-- @return the hash hex string, or nil and error info
+--
function hash.md5(file_or_data)
local hashstr, errors
if bytes.instance_of(file_or_data) then
@@ -48,7 +52,11 @@ function hash.md5(file_or_data)
return hashstr, errors
end
--- generate sha1 from the given file or data
+-- generate sha1 hash from the given file or data
+--
+-- @param file_or_data the file path, data string, or bytes object
+-- @return the hash hex string, or nil and error info
+--
function hash.sha1(file_or_data)
local hashstr, errors
if bytes.instance_of(file_or_data) then
@@ -61,7 +69,11 @@ function hash.sha1(file_or_data)
return hashstr, errors
end
--- generate sha256 from the given file or data
+-- generate sha256 hash from the given file or data
+--
+-- @param file_or_data the file path, data string, or bytes object
+-- @return the hash hex string, or nil and error info
+--
function hash.sha256(file_or_data)
local hashstr, errors
if bytes.instance_of(file_or_data) then
@@ -75,11 +87,19 @@ function hash.sha256(file_or_data)
end
-- generate uuid, e.g "91E8ECF1-417F-4EDF-A574-E22D7D8D204A"
+--
+-- @param str the seed string (optional, random if nil)
+-- @return the uuid string
+--
function hash.uuid(str)
return hash.uuid4(str)
end
-- generate xxhash32 from the given file or data
+--
+-- @param file_or_data the file path, data string, or bytes object
+-- @return the hash hex string, or nil and error info
+--
function hash.xxhash32(file_or_data)
local hashstr, errors
if bytes.instance_of(file_or_data) then
@@ -93,6 +113,10 @@ function hash.xxhash32(file_or_data)
end
-- generate xxhash64 from the given file or data
+--
+-- @param file_or_data the file path, data string, or bytes object
+-- @return the hash hex string, or nil and error info
+--
function hash.xxhash64(file_or_data)
local hashstr, errors
if bytes.instance_of(file_or_data) then
@@ -106,6 +130,10 @@ function hash.xxhash64(file_or_data)
end
-- generate xxhash128 from the given file or data
+--
+-- @param file_or_data the file path, data string, or bytes object
+-- @return the hash hex string, or nil and error info
+--
function hash.xxhash128(file_or_data)
local hashstr, errors
if bytes.instance_of(file_or_data) then
@@ -119,6 +147,10 @@ function hash.xxhash128(file_or_data)
end
-- generate hash32 from string, e.g. "91e8ecf1"
+--
+-- @param str the input string
+-- @return the 32-bit hash hex string
+--
function hash.strhash32(str)
if hash._rand32 then
local data = libc.ptraddr(libc.dataptr(str))
@@ -131,6 +163,10 @@ function hash.strhash32(str)
end
-- generate hash64 from string, e.g. "91e8ecf191e8ecf1"
+--
+-- @param str the input string
+-- @return the 64-bit hash hex string
+--
function hash.strhash64(str)
local data = libc.ptraddr(libc.dataptr(str))
local size = #str
@@ -138,14 +174,21 @@ function hash.strhash64(str)
end
-- generate hash128 from string, e.g. "91e8ecf1417f4edfa574e22d7d8d204a"
+--
+-- @param str the input string
+-- @return the 128-bit hash hex string
+--
function hash.strhash128(str)
local data = libc.ptraddr(libc.dataptr(str))
local size = #str
return hash._xxhash(128, data, size)
end
--- generate random32 hash
--- @note it is easy to trigger hash conflicts
+-- generate random 32-bit hash
+--
+-- @return the random hash hex string
+-- @note it is easy to trigger hash conflicts
+--
function hash.rand32()
if hash._rand32 then
return hash._rand32()
diff --git a/xmake/core/base/hashset.lua b/xmake/core/base/hashset.lua
index 3342a0e60..c052d36ee 100644
--- a/xmake/core/base/hashset.lua
+++ b/xmake/core/base/hashset.lua
@@ -252,6 +252,10 @@ function hashset:clone()
end
-- construct from list of items
+--
+-- @param ... the items to insert
+-- @return the new hashset
+--
function hashset.of(...)
local result = hashset.new()
local data = table.pack(...)
@@ -262,6 +266,10 @@ function hashset.of(...)
end
-- construct from an array
+--
+-- @param array the array of items to insert
+-- @return the new hashset
+--
function hashset.from(array)
local result = hashset.new()
for i = 1, #array do
@@ -270,7 +278,10 @@ function hashset.from(array)
return result
end
--- new hashset
+-- create a new empty hashset
+--
+-- @return the new hashset
+--
function hashset.new()
return hashset {{}, 0}
end
diff --git a/xmake/core/base/heap.lua b/xmake/core/base/heap.lua
index 9b002533e..ac090c4b9 100644
--- a/xmake/core/base/heap.lua
+++ b/xmake/core/base/heap.lua
@@ -62,7 +62,11 @@ function heap._make(add, remove, swap, length, cmp)
return push, pop, rebalance
end
--- cdata heap working over a cdata array
+-- create a heap working over a cdata array (FFI)
+--
+-- @param h the options {size = N, ctype = "int", cmp = function(a, b), data = cdata, length = 0}
+-- @return push(val), pop() -> val, rebalance(index) functions
+--
function heap.cdataheap(h)
ffi = ffi or require("ffi")
assert(h and h.size, "size expected")
@@ -110,7 +114,11 @@ function heap.cdataheap(h)
return h
end
--- value heap working over a Lua table
+-- create a heap working over a Lua table
+--
+-- @param h the options (optional) {cmp = function(a, b)}
+-- @return the heap table with push(val), pop() -> val, rebalance(index)
+--
function heap.valueheap(h)
h = h or {}
local t, n = h, #h
diff --git a/xmake/core/base/io.lua b/xmake/core/base/io.lua
index 3afd187d8..fd1350261 100644
--- a/xmake/core/base/io.lua
+++ b/xmake/core/base/io.lua
@@ -476,6 +476,11 @@ function _filelock:__gc()
end
-- read all lines from file
+--
+-- @param filepath the file path
+-- @param opt the options, e.g. {encoding = "utf8", continuation = "\\"}
+-- @return the lines iterator
+--
function io.lines(filepath, opt)
opt = opt or {}
if opt.close_on_finished == nil then
@@ -489,6 +494,11 @@ function io.lines(filepath, opt)
end
-- read all data from file
+--
+-- @param filepath the file path
+-- @param opt the options, e.g. {encoding = "utf8"}
+-- @return the file content string
+--
function io.readfile(filepath, opt)
opt = opt or {}
local file, errors = io.open(tostring(filepath), "r", opt)
@@ -525,6 +535,12 @@ function io.flush()
end
-- write data to file
+--
+-- @param filepath the file path
+-- @param data the data string
+-- @param opt the options, e.g. {encoding = "utf8"}
+-- @return true on success, or false and error info
+--
function io.writefile(filepath, data, opt)
opt = opt or {}
local file, errors = io.open(tostring(filepath), "w", opt)
@@ -583,6 +599,10 @@ function io.open(filepath, mode, opt)
end
-- open a filelock
+--
+-- @param filepath the lock file path
+-- @return the filelock object
+--
function io.openlock(filepath)
filepath = tostring(filepath)
local lock = io.filelock_open(filepath)
@@ -625,7 +645,13 @@ function io.convert(inputfile, outputfile, opt)
return io.writefile(outputfile, content, {encoding = to})
end
--- save object the the given filepath
+-- save object to the given filepath
+--
+-- @param filepath the file path
+-- @param object the object to serialize (table, string, number, boolean)
+-- @param opt the options, e.g. {orderkeys = true}
+-- @return true on success, or false and error info
+--
function io.save(filepath, object, opt)
opt = opt or {}
assert(filepath and object)
@@ -659,6 +685,11 @@ function io.save(filepath, object, opt)
end
-- load object from the given file
+--
+-- @param filepath the file path
+-- @param opt the options, e.g. {encoding = "utf8"}
+-- @return the deserialized object, or nil and error info
+--
function io.load(filepath, opt)
assert(filepath)
@@ -674,6 +705,13 @@ function io.load(filepath, opt)
end
-- gsub the given file and return replaced data
+--
+-- @param filepath the file path
+-- @param pattern the lua pattern string
+-- @param replace the replacement string or function
+-- @param opt the options, e.g. {encoding = "utf8"}
+-- @return the replaced data string, the replacement count
+--
function io.gsub(filepath, pattern, replace, opt)
-- read all data from file
@@ -699,6 +737,13 @@ function io.gsub(filepath, pattern, replace, opt)
end
-- replace text of the given file and return new file data
+--
+-- @param filepath the file path
+-- @param pattern the plain text or lua pattern to search
+-- @param replace the replacement string
+-- @param opt the options, e.g. {plain = true, encoding = "utf8"}
+-- @return the replaced data string, the replacement count
+--
function io.replace(filepath, pattern, replace, opt)
opt = opt or {}
local data, errors = io.readfile(filepath, opt)
@@ -745,6 +790,12 @@ function io.insert(filepath, lineidx, text, opt)
end
-- cat the given file
+--
+-- @param filepath the file path
+-- @param linecount the line count to read (optional, read all if nil)
+-- @param opt the options, e.g. {encoding = "utf8"}
+-- @return the file content string
+--
function io.cat(filepath, linecount, opt)
opt = opt or {}
local file = io.open(filepath, "r", opt)
diff --git a/xmake/core/base/linuxos.lua b/xmake/core/base/linuxos.lua
index d9e018a36..32af1ccad 100644
--- a/xmake/core/base/linuxos.lua
+++ b/xmake/core/base/linuxos.lua
@@ -66,17 +66,10 @@ function linuxos._uname_r()
return uname_r or nil
end
--- get system name
+-- get linux distribution name
+--
+-- @return the distribution name string, e.g. "ubuntu", "debian", "archlinux", "fedora"
--
--- e.g.
--- - ubuntu
--- - debian
--- - archlinux
--- - rhel
--- - centos
--- - fedora
--- - opensuse
--- - ...
function linuxos.name()
local name = linuxos._NAME
if name == nil then
@@ -138,7 +131,10 @@ function linuxos.name()
return name
end
--- get system version
+-- get linux distribution version
+--
+-- @return the semver version object
+--
function linuxos.version()
local version = linuxos._VERSION
if version == nil then
@@ -198,6 +194,9 @@ function linuxos.version()
end
-- get linux kernel version
+--
+-- @return the semver version object
+--
function linuxos.kernelver()
local version = linuxos._KERNELVER
if version == nil then
diff --git a/xmake/core/base/list.lua b/xmake/core/base/list.lua
index 5b8c43325..671d17be8 100644
--- a/xmake/core/base/list.lua
+++ b/xmake/core/base/list.lua
@@ -217,7 +217,10 @@ function list:ritems()
return iter, self, nil
end
--- new list
+-- create a new doubly-linked list
+--
+-- @return the list instance
+--
function list.new()
return list()
end
diff --git a/xmake/core/base/macos.lua b/xmake/core/base/macos.lua
index a1539061c..7afdbea8b 100644
--- a/xmake/core/base/macos.lua
+++ b/xmake/core/base/macos.lua
@@ -25,7 +25,10 @@ local macos = macos or {}
local os = require("base/os")
local semver = require("base/semver")
--- get system version
+-- get macOS system version
+--
+-- @return the semver version object, e.g. macos.version():ge("14.0")
+--
function macos.version()
-- get it from cache first
diff --git a/xmake/core/base/memory.lua b/xmake/core/base/memory.lua
index ff52658e5..5225a3c8a 100644
--- a/xmake/core/base/memory.lua
+++ b/xmake/core/base/memory.lua
@@ -25,6 +25,10 @@ local memory = memory or {}
local os = require("base/os")
-- get memory info
+--
+-- @param name the specific info name (optional), e.g. "totalsize", "availsize", "usagerate"
+-- @return the memory info table or specific value (sizes in bytes, usagerate in 0.0 ~ 1.0)
+--
function memory.info(name)
local meminfo = memory._MEMINFO
local memtime = memory._MEMTIME
diff --git a/xmake/core/base/os.lua b/xmake/core/base/os.lua
index 142ddd338..9ba469505 100644
--- a/xmake/core/base/os.lua
+++ b/xmake/core/base/os.lua
@@ -577,6 +577,12 @@ function os.cp(srcpath, dstpath, opt)
end
-- move files or directories
+--
+-- @param srcpath the source file/directory path, pattern is supported, e.g. "src/**.h"
+-- @param dstpath the destination file/directory path
+-- @param opt the options, e.g. {rootdir = "src"}
+-- @return true on success, or false and error info
+--
function os.mv(srcpath, dstpath, opt)
-- check arguments
@@ -602,6 +608,11 @@ function os.mv(srcpath, dstpath, opt)
end
-- remove files or directories
+--
+-- @param filepath the file/directory path, pattern is supported, e.g. "src/**.o"
+-- @param opt the options, e.g. {emptydirs = true}
+-- @return true on success, or false and error info
+--
function os.rm(filepath, opt)
opt = opt or {}
@@ -658,6 +669,10 @@ function os.ln(srcpath, dstpath, opt)
end
-- change to directory
+--
+-- @param dir the directory path
+-- @return the previous directory
+--
function os.cd(dir)
assert(dir)
@@ -711,6 +726,10 @@ function os.touch(filepath, opt)
end
-- create directories
+--
+-- @param dir the directory path, will create parent directories automatically
+-- @return true on success, or false and error info
+--
function os.mkdir(dir)
-- check arguments
@@ -732,6 +751,11 @@ function os.mkdir(dir)
end
-- remove directories
+--
+-- @param dir the directory path
+-- @param opt the options, e.g. {emptydirs = true}
+-- @return true on success, or false and error info
+--
function os.rmdir(dir, opt)
-- check arguments
@@ -758,6 +782,9 @@ function os.rmdir(dir, opt)
end
-- get the current directory
+--
+-- @return the current working directory
+--
function os.curdir()
local curdir = os._CURDIR
if curdir == nil then
@@ -768,6 +795,10 @@ function os.curdir()
end
-- get the temporary directory
+--
+-- @param opt the options, e.g. {ramdisk = false}
+-- @return the temporary directory path
+--
function os.tmpdir(opt)
-- is in fakeroot? @note: uid always be 0 in root and fakeroot
@@ -866,6 +897,11 @@ function os.run(cmd)
end
-- run command with arguments list
+--
+-- @param program the program path or name
+-- @param argv the arguments list
+-- @param opt the options, e.g. {envs = {}, curdir = "", detach = false}
+--
function os.runv(program, argv, opt)
-- init options
@@ -1101,6 +1137,12 @@ function os.iorun(cmd)
end
-- run command with arguments and return output and error data
+--
+-- @param program the program path or name
+-- @param argv the arguments list
+-- @param opt the options, e.g. {envs = {}, curdir = "", stdin = ""}
+-- @return the stdout data, the stderr data
+--
function os.iorunv(program, argv, opt)
-- make temporary output and error file
@@ -1264,6 +1306,10 @@ function os.is_subarch(...)
end
-- get the system null device
+--
+-- @param input use as input device if true, otherwise as output device
+-- @return the null device path, e.g. "/dev/null" or "nul"
+--
function os.nuldev(input)
if input then
diff --git a/xmake/core/base/path.lua b/xmake/core/base/path.lua
index 5af6daec9..0d2dadfba 100644
--- a/xmake/core/base/path.lua
+++ b/xmake/core/base/path.lua
@@ -165,8 +165,12 @@ function _instance:__todisplay()
return "<path: " .. (self:empty() and "empty" or self:str()) .. ">"
end
--- get unix-style path, it is usually used on windows
+-- get unix-style path (forward slashes), it is usually used on windows
+--
+-- @param p the path
+-- @return the unix-style path with forward slashes
-- @see https://github.com/xmake-io/xmake/issues/4731
+--
function path.unix(p)
return (tostring(p):gsub(path.sep(), "/"))
end
@@ -202,6 +206,11 @@ function path.normalize(p)
end
-- get the directory of the path
+--
+-- @param p the path
+-- @param sep the path separator (optional, auto-detect if nil)
+-- @return the directory part, e.g. path.directory("/tmp/file.txt") => "/tmp"
+--
function path.directory(p, sep)
p = tostring(p)
if path._directory then
@@ -225,6 +234,11 @@ function path.directory(p, sep)
end
-- get absolute path
+--
+-- @param p the path
+-- @param rootdir the root directory (optional, default is os.curdir())
+-- @return the absolute path
+--
function path.absolute(p, rootdir)
if rootdir then
rootdir = tostring(rootdir)
@@ -233,6 +247,11 @@ function path.absolute(p, rootdir)
end
-- get relative path
+--
+-- @param p the path
+-- @param rootdir the root directory (optional, default is os.curdir())
+-- @return the relative path
+--
function path.relative(p, rootdir)
if rootdir then
rootdir = tostring(rootdir)
@@ -241,6 +260,11 @@ function path.relative(p, rootdir)
end
-- get the filename of the path
+--
+-- @param p the path
+-- @param sep the path separator (optional)
+-- @return the filename with extension, e.g. path.filename("/tmp/file.txt") => "file.txt"
+--
function path.filename(p, sep)
p = tostring(p)
local i = 0
@@ -257,7 +281,11 @@ function path.filename(p, sep)
end
end
--- get the basename of the path
+-- get the basename of the path (filename without extension)
+--
+-- @param p the path
+-- @return the basename, e.g. path.basename("/tmp/file.txt") => "file"
+--
function path.basename(p)
p = tostring(p)
local name = path.filename(p)
@@ -269,7 +297,13 @@ function path.basename(p)
end
end
--- get the file extension of the path: .xxx
+-- get the file extension of the path
+--
+-- @param p the path
+-- @param level the extension level (optional, default is 1)
+-- @return the extension, e.g. path.extension("file.txt") => ".txt"
+-- path.extension("file.tar.gz", 2) => ".tar.gz"
+--
function path.extension(p, level)
p = tostring(p)
local i = p:lastof(".", true)
@@ -288,12 +322,21 @@ function path.extension(p, level)
end
-- join path
+--
+-- @param p the first path component
+-- @param ... the remaining path components
+-- @return the joined path
+--
function path.join(p, ...)
p = tostring(p)
return path.translate(p .. path.sep() .. table.concat({...}, path.sep()))
end
-- split path by the separator
+--
+-- @param p the path
+-- @return the path components table
+--
function path.split(p)
p = tostring(p)
return p:split("[/\\]")
@@ -319,8 +362,11 @@ function path.envsep()
return envsep
end
--- split environment variable with `path.envsep()`,
--- also handles more speical cases such as posix flags and windows quoted paths
+-- split environment variable with `path.envsep()`
+--
+-- @param env_path the environment variable value, e.g. "/usr/bin:/usr/local/bin"
+-- @return the paths table
+--
function path.splitenv(env_path)
local result = {}
if xmake._HOST == "windows" then
@@ -356,8 +402,12 @@ function path.splitenv(env_path)
return result
end
--- concat environment variable with `path.envsep()`,
--- also handles more speical cases such as posix flags and windows quoted paths
+-- concat environment variable with `path.envsep()`
+--
+-- @param paths the paths table
+-- @param envsep the separator (optional, default is path.envsep())
+-- @return the joined environment variable string
+--
function path.joinenv(paths, envsep)
if not paths or #paths == 0 then
return ""
diff --git a/xmake/core/base/privilege.lua b/xmake/core/base/privilege.lua
index f99fac573..c00a82e3c 100644
--- a/xmake/core/base/privilege.lua
+++ b/xmake/core/base/privilege.lua
@@ -24,7 +24,10 @@ local privilege = privilege or {}
-- load modules
local os = require("base/os")
--- store privilege
+-- store current privilege by dropping root to original user
+--
+-- @return true if privilege was stored, false if not root
+--
function privilege.store()
-- check if root
@@ -73,10 +76,17 @@ function privilege.store()
end
-- check if has stored privilege
+--
+-- @return true if privilege was previously stored
+--
function privilege.has()
return privilege._HAS_PRIVILEGE or false
end
+-- restore root privilege temporarily
+--
+-- @return true if privilege was restored
+--
function privilege.get()
-- has?
diff --git a/xmake/core/base/queue.lua b/xmake/core/base/queue.lua
index e5b6980d1..e7f306c11 100644
--- a/xmake/core/base/queue.lua
+++ b/xmake/core/base/queue.lua
@@ -116,7 +116,10 @@ function queue:clone()
return q
end
--- new queue
+-- create a new FIFO queue
+--
+-- @return the queue instance
+--
function queue.new()
return queue()
end
diff --git a/xmake/core/base/semver.lua b/xmake/core/base/semver.lua
index 5858ef7c2..7c2b6ea8d 100644
--- a/xmake/core/base/semver.lua
+++ b/xmake/core/base/semver.lua
@@ -191,7 +191,11 @@ function _instance.__concat(op1, op2)
end
end
--- new an instance
+-- create a new semver instance
+--
+-- @param version the version string, e.g. "1.2.3", ">=1.0 <2.0"
+-- @return the semver instance, or nil and error info
+--
function semver.new(version)
-- parse version first
@@ -207,6 +211,12 @@ function semver.new(version)
end
-- try to match valid version from string
+--
+-- @param str the input string
+-- @param pos the start position (optional, default is 1)
+-- @param pattern the match patterns (optional)
+-- @return the semver instance, or nil if not found
+--
function semver.match(str, pos, pattern)
local patterns = pattern or {"%d+[.]%d+[-+.%w]*", "%d+[.]%d+[.]%d+", "%d+[.]%d+"}
for _, pattern in ipairs(table.wrap(patterns)) do
diff --git a/xmake/core/base/signal.lua b/xmake/core/base/signal.lua
index ee1094c52..a647204ef 100644
--- a/xmake/core/base/signal.lua
+++ b/xmake/core/base/signal.lua
@@ -28,16 +28,26 @@ local os = require("base/os")
signal.SIGINT = 2
-- register signal handler
+--
+-- @param signo the signal number, e.g. signal.SIGINT
+-- @param handler the handler function
+--
function signal.register(signo, handler)
os.signal(signo, handler)
end
--- reset signal, SIGDFL
+-- reset signal to default handler (SIGDFL)
+--
+-- @param signo the signal number
+--
function signal.reset(signo)
os.signal(signo, 1)
end
--- ignore signal, SIGIGN
+-- ignore signal (SIGIGN)
+--
+-- @param signo the signal number
+--
function signal.ignore(signo)
os.signal(signo, 2)
end
diff --git a/xmake/core/base/singleton.lua b/xmake/core/base/singleton.lua
index 92be76664..2b4db4494 100644
--- a/xmake/core/base/singleton.lua
+++ b/xmake/core/base/singleton.lua
@@ -45,6 +45,10 @@ local singleton = singleton or {}
-- return instance
-- end
--
+-- @param key the singleton key (string or function)
+-- @param init the initializer function (optional)
+-- @return the singleton instance, inited (true if already initialized)
+--
function singleton.get(key, init)
-- get key
diff --git a/xmake/core/base/socket.lua b/xmake/core/base/socket.lua
index 901226ec9..fb4536e24 100644
--- a/xmake/core/base/socket.lua
+++ b/xmake/core/base/socket.lua
@@ -744,23 +744,40 @@ function socket.open(socktype, family)
end
-- open tcp socket
+--
+-- @param opt the options, e.g. {family = socket.IPV6}
+-- @return the socket instance, or nil and error info
+--
function socket.tcp(opt)
opt = opt or {}
return socket.open(socket.TCP, opt.family or socket.IPV4)
end
-- open udp socket
+--
+-- @param opt the options, e.g. {family = socket.IPV6}
+-- @return the socket instance, or nil and error info
+--
function socket.udp(opt)
opt = opt or {}
return socket.open(socket.UDP, opt.family or socket.IPV4)
end
--- open unix socket
+-- open unix domain socket
+--
+-- @return the socket instance, or nil and error info
+--
function socket.unix(opt)
return socket.open(socket.TCP, socket.UNIX)
end
-- open and bind tcp socket
+--
+-- @param addr the bind address, e.g. "0.0.0.0", "127.0.0.1"
+-- @param port the bind port
+-- @param opt the options (optional)
+-- @return the bound socket, or nil and error info
+--
function socket.bind(addr, port, opt)
local sock, errors = socket.tcp(opt)
if not sock then
@@ -775,6 +792,11 @@ function socket.bind(addr, port, opt)
end
-- open and bind tcp socket from the unix address
+--
+-- @param addr the unix socket path
+-- @param opt the options (optional)
+-- @return the bound socket, or nil and error info
+--
function socket.bind_unix(addr, opt)
local sock, errors = socket.unix(opt)
if not sock then
@@ -789,6 +811,12 @@ function socket.bind_unix(addr, opt)
end
-- open and connect tcp socket
+--
+-- @param addr the server address
+-- @param port the server port
+-- @param opt the options (optional)
+-- @return the connected socket, or nil and error info
+--
function socket.connect(addr, port, opt)
local sock, errors = socket.tcp(opt)
if not sock then
@@ -803,6 +831,11 @@ function socket.connect(addr, port, opt)
end
-- open and connect tcp socket from the unix address
+--
+-- @param addr the unix socket path
+-- @param opt the options (optional)
+-- @return the connected socket, or nil and error info
+--
function socket.connect_unix(addr, opt)
local sock, errors = socket.unix(opt)
if not sock then
diff --git a/xmake/core/base/table.lua b/xmake/core/base/table.lua
index 45cb4f23d..6be5893d6 100644
--- a/xmake/core/base/table.lua
+++ b/xmake/core/base/table.lua
@@ -89,7 +89,11 @@ if xmake._ARCH:startswith("arm") then
end
end
--- join all objects and tables
+-- join all objects and tables into a new table
+--
+-- @param ... the tables or values to join
+-- @return the new joined table
+--
function table.join(...)
local result = {}
for _, t in ipairs({...}) do
@@ -105,7 +109,12 @@ function table.join(...)
return result
end
--- join all objects and tables to self
+-- join all objects and tables to self (in-place)
+--
+-- @param self the destination table
+-- @param ... the tables or values to append
+-- @return the destination table
+--
function table.join2(self, ...)
for _, t in ipairs({...}) do
if type(t) == "table" and not t.__wrap_locked__ then
@@ -189,6 +198,10 @@ function table.copy2(self, copied)
end
-- inherit interfaces and create a new instance
+--
+-- @param ... the base classes to inherit from
+-- @return the new instance with inherited interfaces
+--
function table.inherit(...)
local classes = {...}
local instance = {}
@@ -240,6 +253,13 @@ function table.inherit2(self, ...)
end
-- slice table array
+--
+-- @param self the source array
+-- @param first the start index (default: 1)
+-- @param last the end index (default: #self)
+-- @param step the step (default: 1)
+-- @return the sliced array
+--
function table.slice(self, first, last, step)
local sliced = {}
for i = first or 1, last or #self, step or 1 do
@@ -258,8 +278,12 @@ function table.is_dictionary(dict)
return type(dict) == "table" and dict[1] == nil
end
--- does contain the given values in table?
--- contains arg1 or arg2 ...
+-- does the table contain any of the given values?
+--
+-- @param t the table
+-- @param ... the values to check (returns true if any is found)
+-- @return true if any value is found
+--
function table.contains(t, arg1, arg2, ...)
local found = false
if arg2 == nil then -- only one value
@@ -325,7 +349,11 @@ function table.to_array(iterator, state, var)
return result, count
end
--- unwrap array if be only one value
+-- unwrap array, return the value directly if only one element
+--
+-- @param array the array table
+-- @return the single value, or the original array if multiple elements
+--
function table.unwrap(array)
if type(array) == "table" and not array.__wrap_locked__ then
if #array == 1 then
@@ -335,7 +363,11 @@ function table.unwrap(array)
return array
end
--- wrap value to array
+-- wrap value to array, ensure the result is always a table
+--
+-- @param value the value (nil returns {}, table returns as-is, other wraps in {})
+-- @return the array table
+--
function table.wrap(value)
if nil == value then
return {}
@@ -365,7 +397,12 @@ function table.wrap_unlock(value)
return value
end
--- remove repeat from the given array
+-- remove duplicate values from the given array
+--
+-- @param array the array table
+-- @param barrier keep order with barrier? (optional)
+-- @return the deduplicated array
+--
function table.unique(array, barrier)
if table.is_array(array) then
if table.getn(array) ~= 1 then
@@ -430,6 +467,10 @@ end
table.unpack = table.unpack or unpack
-- get keys of a table
+--
+-- @param tbl the table
+-- @return the keys array
+--
function table.keys(tbl)
local keyset = {}
local n = 0
@@ -440,7 +481,12 @@ function table.keys(tbl)
return keyset, n
end
--- get order keys of a table
+-- get sorted keys of a table
+--
+-- @param tbl the table
+-- @param callback the sort comparator function (optional)
+-- @return the sorted keys array
+--
function table.orderkeys(tbl, callback)
local callback = type(callback) == "function" and callback or nil
local keys = table.keys(tbl)
@@ -475,6 +521,10 @@ function table.orderpairs(t, callback)
end
-- get values of a table
+--
+-- @param tbl the table
+-- @return the values array
+--
function table.values(tbl)
local valueset = {}
local n = 0
@@ -514,6 +564,11 @@ function table.reverse(arr)
end
-- remove values if predicate is matched
+--
+-- @param tbl the table
+-- @param pred the predicate function, e.g. function(v, k) return v == "xxx" end
+-- @return the modified table
+--
function table.remove_if(tbl, pred)
if table.is_array(tbl) then
for i = #tbl, 1, -1 do
@@ -537,6 +592,11 @@ function table.empty(tbl)
end
-- return indices or keys for the given value
+--
+-- @param tbl the table
+-- @param value the value to find
+-- @return the index/key, or nil if not found
+--
function table.find(tbl, value)
local result
if table.is_array(tbl) then
diff --git a/xmake/core/base/text.lua b/xmake/core/base/text.lua
index ec316475e..9d4294ee6 100644
--- a/xmake/core/base/text.lua
+++ b/xmake/core/base/text.lua
@@ -160,7 +160,13 @@ function text._lastwbr(str, width, wordbreak)
end
end
--- break lines
+-- break text into lines at the given width with word wrapping
+--
+-- @param str the text string or lines array
+-- @param width the maximum line width in characters
+-- @param opt the options (optional)
+-- @return the wrapped lines array
+--
function text.wordwrap(str, width, opt)
opt = opt or {}
diff --git a/xmake/core/base/thread.lua b/xmake/core/base/thread.lua
index 26ac672c3..067b92f3f 100644
--- a/xmake/core/base/thread.lua
+++ b/xmake/core/base/thread.lua
@@ -968,11 +968,18 @@ function thread.new(callback, opt)
end
-- get the running thread name
+--
+-- @return the current thread name
+--
function thread.running()
return thread._RUNNING
end
--- open a mutex
+-- create a mutex for thread synchronization
+--
+-- @param name the mutex name for debugging
+-- @return the mutex instance, or nil and error info
+--
function thread.mutex(name)
local mutex = thread.mutex_init()
if mutex then
@@ -982,7 +989,11 @@ function thread.mutex(name)
end
end
--- open a event
+-- create an event for thread signaling
+--
+-- @param name the event name for debugging
+-- @return the event instance, or nil and error info
+--
function thread.event(name)
local event = thread.event_init()
if event then
@@ -992,7 +1003,12 @@ function thread.event(name)
end
end
--- open a semaphore
+-- create a semaphore for thread synchronization
+--
+-- @param name the semaphore name for debugging
+-- @param value the initial value (default: 0)
+-- @return the semaphore instance, or nil and error info
+--
function thread.semaphore(name, value)
local semaphore = thread.semaphore_init(value or 0)
if semaphore then
@@ -1002,7 +1018,11 @@ function thread.semaphore(name, value)
end
end
--- open a queue
+-- create a thread-safe queue
+--
+-- @param name the queue name for debugging
+-- @return the queue instance, or nil and error info
+--
function thread.queue(name)
local queue = thread.queue_init()
if queue then
@@ -1012,7 +1032,11 @@ function thread.queue(name)
end
end
--- open a sharedata
+-- create a thread-safe shared data container
+--
+-- @param name the sharedata name for debugging
+-- @return the sharedata instance, or nil and error info
+--
function thread.sharedata(name)
local sharedata = thread.sharedata_init()
if sharedata then
diff --git a/xmake/core/base/tty.lua b/xmake/core/base/tty.lua
index c3681cdd3..bd7b60277 100644
--- a/xmake/core/base/tty.lua
+++ b/xmake/core/base/tty.lua
@@ -355,7 +355,10 @@ function tty._find_shell_from_parent()
end
end
--- get shell name
+-- get shell name, e.g. "bash", "zsh", "powershell", "cmd", "nu"
+--
+-- @return the shell name string
+--
function tty.shell()
local shell = tty._SHELL
if shell == nil then
@@ -464,7 +467,10 @@ function tty.term()
return tty._TERM
end
--- has emoji?
+-- does the terminal support emoji?
+--
+-- @return true if supported
+--
function tty.has_emoji()
local has_emoji = tty._HAS_EMOJI
if has_emoji == nil then
diff --git a/xmake/core/base/winos.lua b/xmake/core/base/winos.lua
index 9d786fdfc..d43f08262 100644
--- a/xmake/core/base/winos.lua
+++ b/xmake/core/base/winos.lua
@@ -33,6 +33,10 @@ winos._registry_keys = winos._registry_keys or winos.registry_keys
winos._registry_values = winos._registry_values or winos.registry_values
winos._processes = winos._processes or winos.processes
+-- get the ANSI code page
+--
+-- @return the code page number
+--
function winos.ansi_cp()
if not winos._ANSI_CP then
winos._ANSI_CP = winos._ansi_cp()
@@ -40,6 +44,10 @@ function winos.ansi_cp()
return winos._ANSI_CP
end
+-- get the OEM code page
+--
+-- @return the code page number
+--
function winos.oem_cp()
if not winos._OEM_CP then
winos._OEM_CP = winos._oem_cp()
@@ -114,7 +122,10 @@ function winos._version_le(self, version)
end
end
--- get system version
+-- get windows system version
+--
+-- @return the version object, e.g. winos.version():major(), winos.version():eq("win10")
+--
function winos.version()
local winver = winos._VERSION
if winver == nil then
@@ -156,6 +167,11 @@ function winos.version()
end
-- get command arguments on windows to solve 8192 character command line length limit
+--
+-- @param argv the arguments list
+-- @param opt the options, e.g. {program = "cl.exe", wrapflag = "@"}
+-- @return the program, the new arguments list (may use @file)
+--
function winos.cmdargv(argv, opt)
-- too long arguments?
diff --git a/xmake/core/project/config.lua b/xmake/core/project/config.lua
index 93c1ff6af..451bfe8ae 100644
--- a/xmake/core/project/config.lua
+++ b/xmake/core/project/config.lua
@@ -69,7 +69,11 @@ function config._is_value(value, ...)
return false
end
--- get the current given configuration
+-- get the current given configuration value
+--
+-- @param name the configuration name, e.g. "plat", "arch", "mode"
+-- @return the configuration value
+--
function config.get(name)
local value = nil
if config._CONFIGS then
@@ -105,17 +109,26 @@ function config.set(name, value, opt)
end
end
--- get the current platform
+-- get the current platform, e.g. "windows", "linux", "macosx"
+--
+-- @return the platform name
+--
function config.plat()
return config.get("plat")
end
--- get the current architecture
+-- get the current architecture, e.g. "x86_64", "arm64"
+--
+-- @return the architecture name
+--
function config.arch()
return config.get("arch")
end
--- get the current mode
+-- get the current build mode, e.g. "debug", "release"
+--
+-- @return the mode name
+--
function config.mode()
return config.get("mode")
end
@@ -189,6 +202,9 @@ function config.cachedir()
end
-- get the configure directory on the current host/arch platform
+--
+-- @return the configuration cache directory, e.g. ".xmake/macosx/x86_64"
+--
function config.directory()
if config._DIRECTORY == nil then
local rootdir = os.getenv("XMAKE_CONFIGDIR")
diff --git a/xmake/core/project/project.lua b/xmake/core/project/project.lua
index 7058b4190..f9e199a1b 100644
--- a/xmake/core/project/project.lua
+++ b/xmake/core/project/project.lua
@@ -818,6 +818,9 @@ function project.rcfiles()
end
-- get the project directory
+--
+-- @return the project root directory path
+--
function project.directory()
return os.projectdir()
end
@@ -862,6 +865,9 @@ function project.extraconf(name, item, key)
end
-- get the project name
+--
+-- @return the project name string defined by set_project()
+--
function project.name()
local name = project.get("project")
-- TODO multi project names? we only get the first name now.
@@ -987,7 +993,12 @@ function project.is_loaded()
return project._memcache():get("targets_loaded")
end
--- get the given target
+-- get the given target by name
+--
+-- @param name the target name
+-- @param opt the options (optional)
+-- @return the target instance, or nil if not found
+--
function project.target(name, opt)
opt = opt or {}
local targets = project.targets()
@@ -1009,7 +1020,10 @@ function project.target_add(t)
end
end
--- get targets
+-- get all targets
+--
+-- @return the targets table {name = target_instance, ...}
+--
function project.targets()
local loading = false
local targets = project._memcache():get("targets")
@@ -1079,6 +1093,9 @@ function project.required_package(name)
end
-- get required packages
+--
+-- @return the required packages table {name = package_instance, ...}
+--
function project.required_packages()
local requires = project._memcache():get("requires")
if not requires then
diff --git a/xmake/core/tool/compiler.lua b/xmake/core/tool/compiler.lua
index 1afa7165e..e00505a4f 100644
--- a/xmake/core/tool/compiler.lua
+++ b/xmake/core/tool/compiler.lua
@@ -117,6 +117,11 @@ function compiler._load_tool(sourcekind, target)
end
-- load the compiler from the given source kind
+--
+-- @param sourcekind the source kind, e.g. "cc", "cxx", "mm", "mxx", "as", "gc", "dc", "rc", "sc", "cs"
+-- @param target the target or options table, e.g. {target = target}
+-- @return the compiler instance, or nil and error info
+--
function compiler.load(sourcekind, target)
if not sourcekind then
return nil, "unknown source kind!"
@@ -204,6 +209,11 @@ function compiler.load(sourcekind, target)
end
-- build the source files (compile and link)
+--
+-- @param sourcefiles the source file paths
+-- @param targetfile the target file path
+-- @param opt the options, e.g. {target = target, configs = {}}
+--
function compiler:build(sourcefiles, targetfile, opt)
opt = opt or {}
@@ -265,6 +275,11 @@ function compiler:buildcmd(sourcefiles, targetfile, opt)
end
-- compile the source files
+--
+-- @param sourcefiles the source file paths
+-- @param objectfile the output object file path
+-- @param opt the options, e.g. {target = target, compflags = {}, dependinfo = {}}
+--
function compiler:compile(sourcefiles, objectfile, opt)
opt = opt or {}
diff --git a/xmake/core/tool/linker.lua b/xmake/core/tool/linker.lua
index 443e10d43..9cdff8840 100644
--- a/xmake/core/tool/linker.lua
+++ b/xmake/core/tool/linker.lua
@@ -115,6 +115,12 @@ function linker._load_tool(targetkind, sourcekinds, target)
end
-- load the linker from the given target kind
+--
+-- @param targetkind the target kind, e.g. "binary", "shared", "static"
+-- @param sourcekinds the source kinds table, e.g. {"cc", "cxx"}
+-- @param target the target instance
+-- @return the linker instance, or nil and error info
+--
function linker.load(targetkind, sourcekinds, target)
assert(sourcekinds)
@@ -227,6 +233,11 @@ function linker.load(targetkind, sourcekinds, target)
end
-- link the target file
+--
+-- @param objectfiles the object file paths
+-- @param targetfile the target file path
+-- @param opt the options, e.g. {target = target, linkflags = {}}
+--
function linker:link(objectfiles, targetfile, opt)
opt = opt or {}
local linkflags = opt.linkflags or self:linkflags(opt)
diff --git a/xmake/core/tool/toolchain.lua b/xmake/core/tool/toolchain.lua
index 35be6b824..5ca360492 100644
--- a/xmake/core/tool/toolchain.lua
+++ b/xmake/core/tool/toolchain.lua
@@ -722,7 +722,12 @@ function toolchain.add_directories(...)
toolchain._DIRS = table.unique(dirs)
end
--- load toolchain
+-- load toolchain by name
+--
+-- @param name the toolchain name, e.g. "gcc", "clang", "msvc", "dotnet"
+-- @param opt the options, e.g. {plat = "linux", arch = "x86_64"}
+-- @return the toolchain instance, or nil and error info
+--
function toolchain.load(name, opt)
opt = opt or {}
diff --git a/xmake/modules/core/project/depend.lua b/xmake/modules/core/project/depend.lua
index ca05dc2f4..71e50a56a 100644
--- a/xmake/modules/core/project/depend.lua
+++ b/xmake/modules/core/project/depend.lua
@@ -51,6 +51,11 @@ function _get_depfiles_parser(depfiles_format)
end
-- load dependent info from the given file (.d)
+--
+-- @param dependfile the depend file path
+-- @param opt the options, e.g. {target = target}
+-- @return the depend info table, or nil if not found
+--
function load(dependfile, opt)
if os.isfile(dependfile) then
-- may be the depend file has been incomplete when if the compilation process is abnormally interrupted
@@ -83,6 +88,10 @@ function _is_show_diagnosis_info()
end
-- save dependent info to file
+--
+-- @param dependinfo the depend info table {files = {}, values = {}}
+-- @param dependfile the depend file path
+--
function save(dependinfo, dependfile)
io.save(dependfile, dependinfo)
end