Click or drag to resize

imbStringGeneratorsmakeUniqueName Method (String, IEnumerableString, String, Int32, Boolean)

imbSCI | imbACE | imbNLP | imbWEM | imbWBI
Pravi unikatno ime na osnovu kandidata i prosledjene liste postojecih imena

Namespace:  imbSCI.Core.extensions.text
Assembly:  imbSCI.Core (in imbSCI.Core.dll) Version: 0.3.58.
Syntax
C#
public static string makeUniqueName(
	this string candidate,
	IEnumerable<string> used,
	string format = "D3",
	int limit = 1000,
	bool disableAutoAddToIList = true
)
Request Example View Source

Parameters

candidate
Type: SystemString
String koji je trenutno kandidat za ime
used
Type: System.Collections.GenericIEnumerableString
Lista imena koja su koriscena
format (Optional)
Type: SystemString
String format za formatiranje broja
limit (Optional)
Type: SystemInt32
Na koliko pokusaja je limitiran proces
disableAutoAddToIList (Optional)
Type: SystemBoolean
if set to true it wil not automatically add the result to used.

Return Value

Type: String
Unikatno ime koje se sastoji od kandidata i dodatog broja na kraju

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).
Remarks

Finds proper unique adding using candidate count sufix in provided format

If the used is IListT and disableAutoAddToIList is false it will Add(T) the result.

See Also