לדלג לתוכן

יחידה:ניקוד

מתוך חב"דפדיה, אנציקלופדיה חב"דית חופשית
גרסה מ־15:47, 30 בספטמבר 2025 מאת מ. רובין (שיחה | תרומות) (יצירת דף עם התוכן "function main(frame) local inp = frame.args[1] local n = string.len(inp) local i = 1 while i <= n do local a = string.byte(inp, i, i) local c = string.byte(inp, i + 1, i + 1) if (a < 128) then i = i + 1 else if (a == 214 and c > 175 and c~=190) or (a == 215 and c < 144) then return a*10000+c end i = i + 2 end end return end return {main = main}")
(הבדל) → הגרסה הקודמת | הגרסה האחרונה (הבדל) | הגרסה הבאה ← (הבדל)

ניתן ליצור תיעוד על היחידה הזאת בדף יחידה:ניקוד/תיעוד

function main(frame)
	local inp = frame.args[1]
	local n = string.len(inp)
	local i = 1
	while i <= n do
		local a = string.byte(inp, i, i)
		local c = string.byte(inp, i + 1, i + 1)
		if (a < 128) then
			i = i + 1
		else
			if (a == 214 and c > 175 and c~=190) or (a == 215 and c < 144) then
				return a*10000+c
			end
			i = i + 2
		end
	end
	return
end

return {main = main}