Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
文字列を 20 文字 (またはテールの場合はそれ以下) の部分文字列に分割したいと思います。ライブラリはありますか、そのためのクラスを作成する必要がありますか?
または、Groovy を使用すると、次のことができます。
assert 'abcdefghij'.toList().collate( 3 )*.join() == ['abc', 'def', 'ghi', 'j']