0
定義的長度比方說,我有一個字符串..將字符串分割與蟒蛇
lyrics = "Never gonna give you up Never gonna let you down Never gonna run around and desert you Never gonna make you cry Never gonna say goodbye Never gonna tell a lie and hurt you"
我只希望在一個行顯示23個字符:
Never gonna give you up
Never gonna let you dow
n Never gonna run aroun
d and desert you Never
gonna make you cry Neve
r gonna say goodbye Nev
er gonna tell a lie and
hurt you
(希望我沒有」 t搞砸了,讓我們假裝每行有24個字符,我很困,我甚至不能算)
什麼是最好的方式去做這件事?
您確定要分割這樣的文字嗎? – TigerhawkT3