Navigation: CodeStencil > Custom Library > Class Library > Expansion Namespace > Extensions Class > Extensions Methods > AddAfter Method > Extensions.AddAfter Method (String, String, Int32, Int32) |
Adds character(s) after the string depending whether it is the last element output from a loop. For example when you want to add comma while listing items in a ForEach or For loop
Namespace: ZeraSystems.CodeNanite.Expansion
Assembly: ZeraSystems.CodeNanite.Expansion (in ZeraSystems.CodeNanite.Expansion.dll)
public static string AddAfter(
string str,
string text,
int index,
int count
)
str
Type: String
The string to be updated
text
Type: String
The character of string to be added after the passed string
index
Type: Int32
The index of the current element. Remember to ADD 1 for 0-based lists/elements
count
Type: Int32
The total number of elements
System.String.
ZeraSystems.CodeNanite.Expansion Namespace