/ LJCPHPCodeDoc / LJCTextLib / LJCStringBuilder / Append


Parameters
$text - The text value.
$indent - The number of tabs to add to the line beginning.
$addBreak - Adds an HTML break before the cr/lf.

Syntax

PHP
public function Append(?string $text, int $indent = 0
, bool $addBreak = false)

Appends text with indents.

Example

PHP
 $webCommonPath = "c:/inetpub/wwwroot/LJCPHPCommon";
 require_once "$webCommonPath/LJCTextLib.php";
 
 $builder = new StringBuilder();
 $builder->Append("First ");
 $builder->Append("Name");
 
 // $text = "First Name"
 $text = $builder->ToString();

Copyright © Lester J. Clark and Contributors.
Licensed under the MIT License.