InsertLinebreaks

InsertLinebreaks["string"]

在字符串 string 中插入换行符,使得字符串中没有行超过78个字符.

InsertLinebreaks["string",n]

插入换行符,使得没有行超过 n 个字符.

更多信息

  • InsertLinebreaks 通过用换行符替代空白.
  • 如果无空白字符的单个跨度长于 n 个字符,会在跨度内每 n 个字符中插入换行符.

范例

基本范例  (1)

插入换行符,确保没有行超过30个字符:

长于30个字符的单词会被断开:

Wolfram Research (2015),InsertLinebreaks,Wolfram 语言函数,https://reference.wolfram.com/language/ref/InsertLinebreaks.html.

文本

Wolfram Research (2015),InsertLinebreaks,Wolfram 语言函数,https://reference.wolfram.com/language/ref/InsertLinebreaks.html.

CMS

Wolfram 语言. 2015. "InsertLinebreaks." Wolfram 语言与系统参考资料中心. Wolfram Research. https://reference.wolfram.com/language/ref/InsertLinebreaks.html.

APA

Wolfram 语言. (2015). InsertLinebreaks. Wolfram 语言与系统参考资料中心. 追溯自 https://reference.wolfram.com/language/ref/InsertLinebreaks.html 年

BibTeX

@misc{reference.wolfram_2024_insertlinebreaks, author="Wolfram Research", title="{InsertLinebreaks}", year="2015", howpublished="\url{https://reference.wolfram.com/language/ref/InsertLinebreaks.html}", note=[Accessed: 21-November-2024 ]}

BibLaTeX

@online{reference.wolfram_2024_insertlinebreaks, organization={Wolfram Research}, title={InsertLinebreaks}, year={2015}, url={https://reference.wolfram.com/language/ref/InsertLinebreaks.html}, note=[Accessed: 21-November-2024 ]}