?
This document uses PHP Chinese website manual Release
Attribute Name | Type | Required | Default | Description |
---|---|---|---|---|
style | string | No | n/a | preset style |
indent | number | No | 0 | The number of chars to indent every line |
indent_first | number | No | 0 | The number of chars to indent the first line |
indent_char | string | No | (single space) | The character (or string of chars) to indent with |
wrap | number | No | 80 | How many characters to wrap each line to |
wrap_char | string | No | \n | The character (or string of chars) to break each line with |
wrap_cut | boolean | No | false | If true, wrap will break the line at the exact character instead of at a word boundary |
assign | string | No | n/a | the template variable the output will be assigned to |
屬性 | 類型 | 是否必須 | 缺省值 | 描述 |
---|---|---|---|---|
style | string | No | n/a | 預(yù)處理風(fēng)格 |
indent | number | No | 0 | 單行縮進(jìn)的字符數(shù)目 |
indent_first | number | No | 0 | 首行縮進(jìn)的字符數(shù)目 |
indent_char | string | No | (single space) | 填充縮進(jìn)區(qū)域的字符(或字符串) |
wrap | number | No | 80 | 單行長(zhǎng)度,超過(guò)該長(zhǎng)度自動(dòng)折行 |
wrap_char | string | No | \n | 折行使用的字符(或字符串),被附加在行尾 |
wrap_cut | boolean | No | false | 如果設(shè)置為真,換行時(shí)不考慮換行點(diǎn)所在位置是否為完整單詞,直接換行. 反之將在單詞的邊界處換行. |
assign | string | No | n/a | 輸出值將被賦給模板變量的名稱 |
textformat is a block function used to format text. It basically cleans up spaces and special characters, and formats paragraphs by wrapping at a boundary and indenting lines.
textformat 用于格式化文本. 該函數(shù)主要清理空格和特殊字符,對(duì)段落按單詞邊界換行和行縮進(jìn)等段落格式化處理.
You can set the parameters explicitly, or use a preset style. Currently "email" is the only available style.
用戶可以明確設(shè)置各參數(shù),或使用預(yù)處理風(fēng)格. 目前只有唯一可用風(fēng)格"email".
?
Example 8-18. textformat
|