Closed anneeb closed 5 years ago
@brianru it should
> const str = '1=2=3=4=5='
undefined
> const [a,...b]=str.split('=')
undefined
> b
[ '2', '3', '4', '5', '' ]
> b.join('=');
'2=3=4=5='
EDIT: it also works for multiple trails
> const str2 = '1=2=3=4=5===='
undefined
> const [c,...d]=str2.split('=')
undefined
> d
[ '2', '3', '4', '5', '', '', '', '' ]
> d.join('=')
'2=3=4=5===='
Would this work with the example in the bug report? In that example the last
=
is the end of the namespace. https://github.com/stardog-union/stardog-studio/issues/1245