Module:string/char: Revision history

Jump to navigation Jump to search

Diff selection: Mark the radio buttons of the revisions to compare and hit enter or the button at the bottom.
Legend: (cur) = difference with latest revision, (prev) = difference with preceding revision, m = minor edit.

2 July 2024

  • curprev 22:3322:33, 2 July 2024Sware talk contribs 1,019 bytes +1,019 Created page with "local char = string.char local concat = table.concat local tonumber = tonumber local function err(cp) error("Codepoint " .. cp .. " is out of range: codepoints must be between 0x0 and 0x10FFFF.", 2) end local function utf8_char(cp) cp = tonumber(cp) if cp < 0 then err("-0x" .. ("%X"):format(-cp + 1)) elseif cp < 0x80 then return char(cp) elseif cp < 0x800 then return char( 0xC0 + cp / 0x40, 0x80 + cp % 0x40 ) elseif cp < 0x10000 then if cp >= 0xD8..."