def g_unpack(string)
codepoints = u_unpack(string)
unpacked = []
pos = 0
marker = 0
eoc = codepoints.length
while(pos < eoc)
pos += 1
previous = codepoints[pos-1]
current = codepoints[pos]
if (
( previous == database.boundary[:cr] and current == database.boundary[:lf] ) or
( database.boundary[:l] === previous and in_char_class?(current, [:l,:v,:lv,:lvt]) ) or
( in_char_class?(previous, [:lv,:v]) and in_char_class?(current, [:v,:t]) ) or
( in_char_class?(previous, [:lvt,:t]) and database.boundary[:t] === current ) or
(database.boundary[:extend] === current)
)
else
unpacked << codepoints[marker..pos-1]
marker = pos
end
end
unpacked
end