Software /
code /
prosody
Comparison
util/human/io.lua @ 12975:d10957394a3c
util: Prefix module imports with prosody namespace
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Fri, 17 Mar 2023 16:23:16 +0100 |
parent | 12783:d513e4bd4928 |
child | 13030:1f89a2a9f532 |
comparison
equal
deleted
inserted
replaced
12974:ba409c67353b | 12975:d10957394a3c |
---|---|
1 local array = require "util.array"; | 1 local array = require "prosody.util.array"; |
2 local utf8 = rawget(_G, "utf8") or require"util.encodings".utf8; | 2 local utf8 = rawget(_G, "utf8") or require"prosody.util.encodings".utf8; |
3 local len = utf8.len or function(s) | 3 local len = utf8.len or function(s) |
4 local _, count = s:gsub("[%z\001-\127\194-\253][\128-\191]*", ""); | 4 local _, count = s:gsub("[%z\001-\127\194-\253][\128-\191]*", ""); |
5 return count; | 5 return count; |
6 end; | 6 end; |
7 | 7 |