Click or drag to resize

imbStringOperationstrimToLimit Method

imbSCI | imbACE | imbNLP | imbWEM | imbWBI
Skraćuje string na zadati limit, ako ima potrebe. Dodace sufix samo ako je skracivao string. Podrzava snapToWord

Namespace:  imbSCI.Core.extensions.text
Assembly:  imbSCI.Core (in imbSCI.Core.dll) Version: 0.3.58.
Syntax
C#
public static string trimToLimit(
	this string input,
	int limit,
	bool removeNewLine,
	string sufix = "... ",
	bool isInvert = false,
	bool snapToWord = true
)
Request Example View Source

Parameters

input
Type: SystemString
String koji se skraćuje
limit
Type: SystemInt32
Do koje dužine je dozvoljen
removeNewLine
Type: SystemBoolean
Da li briše i NewLine tagove
sufix (Optional)
Type: SystemString
Koji sufix da stavi u nastavku
isInvert (Optional)
Type: SystemBoolean
Ako je True onda ce skratiti string sa desne strane
snapToWord (Optional)
Type: SystemBoolean

Return Value

Type: String

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type String. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
See Also