nullable
prefix and the params from the type name self
assert "String".strip_nullable_and_params == "String"
assert "nullable Array[Int]".strip_nullable_and_params == "Array"
assert "Map[Set[String], Set[Int]]".strip_nullable_and_params == "Map"
# Strip the `nullable` prefix and the params from the type name `self`
#
# ~~~
# assert "String".strip_nullable_and_params == "String"
# assert "nullable Array[Int]".strip_nullable_and_params == "Array"
# assert "Map[Set[String], Set[Int]]".strip_nullable_and_params == "Map"
# ~~~
fun strip_nullable_and_params: Text
do
var class_name = strip_nullable
var bracket_index = class_name.index_of('[')
if bracket_index == -1 then return class_name
return class_name.substring(0, bracket_index)
end
lib/serialization/engine_tools.nit:82,2--96,4