Returns a UTF-16 escape value

var s = "\\ud800\\udfd3"
assert s.from_utf16_digit(2) == 0xD800
assert s.from_utf16_digit(8) == 0xDFD3

Property definitions

core $ Text :: from_utf16_digit
	# Returns a UTF-16 escape value
	#
	# ~~~
	# var s = "\\ud800\\udfd3"
	# assert s.from_utf16_digit(2) == 0xD800
	# assert s.from_utf16_digit(8) == 0xDFD3
	# ~~~
	fun from_utf16_digit(pos: nullable Int): Int do
		if pos == null then pos = 0
		return to_hex(pos, 4)
	end
lib/core/text/abstract_text.nit:883,2--893,4