0

変数内のテキストを常に 50 文字の後に分割するにはどうすればよいですか?

50文字の後の新しい行でのみ分割されます

set length [::textutil::adjust $text -length 50 -strictlength true]

よろしく

編集:

入力は、変数 $Plot のこのテキストです

LaRochelle, a former pirate captain, is caught by the British. To get his 
ship back, he works as a spy against other pirates, first of all Blackbeard 
and Providence. He works on some ships, crossing the Caribbean sea, with the 
intention


set pieces [regexp -all -inline {.{1,50}} $Plot]
set 0 [lindex [lindex $pieces 0] 0]
set 1 [lindex [lindex $pieces 1] 1]
putnow "PRIVMSG $channel :$0"

出力は次のとおりです。

<testbot> LaRochelle,
<testbot> British.

残念ながらもうありません..

4

2 に答える 2