Removes the numeric extension if present

intrude import core::fixed_ints_text
assert "0xFEFFu8".strip_numext  == "0xFEFF"
assert "0b01001u8".strip_numext == "0b01001"
assert "0o872u8".strip_numext   == "0o872"
assert "98".strip_numext        == "98"

Property definitions

core :: fixed_ints_text $ Text :: strip_numext
	# Removes the numeric extension if present
	#
	#     intrude import core::fixed_ints_text
	#     assert "0xFEFFu8".strip_numext  == "0xFEFF"
	#     assert "0b01001u8".strip_numext == "0b01001"
	#     assert "0o872u8".strip_numext   == "0o872"
	#     assert "98".strip_numext        == "98"
	private fun strip_numext: Text do
		var ext = get_numext
		if ext != "" then return substring(0, length - ext.length)
		return self
	end
lib/core/text/fixed_ints_text.nit:176,2--187,4