Documentation > CMS Template API Library > Util > WrapText(String,Int32,String)

WrapText

Wraps the text by inserting the delimiter into the text at the specified interval. WrapText will attempt to wrap the text at a word boundary in order preserve the readability of the text. As a result, some of the intervals will be less than the size provided, but never greater.

public System.String WrapText(String,Int32,String)


Returns

A string wrapping the provided delimiter at the interval size.

Parameters

NameDescriptionType
text The text. System.String
size The size. System.Int32
delimiter The delimiter. System.String

Code Example

C#

Sample:

            
            Util.WrapText(asset["article_body"], 15, "<br />");
            
            

Connect with Crownpeak