Sage Modeling and Simulation Library

StringOperations Methods

The StringOperations type exposes the following members.

Methods


  Name Description
Public method Static member Compress
Compresses the string.
Public method Static member Decompress
Decompresses the string.
Public method Static member NormalizeLength
Public method Static member Spaces
Public method Static member ToCommasAndAndedList(IEnumerable<(Of <<'(String>)>>))
Given IEnumerable of strings such as {"Foo", "Bar", "Baz"} returns a string representation, "Foo, Bar and Baz".
Public method Static member ToCommasAndAndedList(ArrayList)
Given a list of {"Foo", "Bar", "Baz"} returns a string representation, "Foo, Bar and Baz".
Public method Static member ToCommasAndAndedList<(Of <<'(T>)>>)(IEnumerable<(Of <<'(T>)>>), Func<(Of <<'(T, String>)>>))
Given an IEnumerable of type T and a converter function from T to string, returns a string representation such as "Foo, Bar and Baz".
Public method Static member ToCommasAndAndedListOfNames<(Of <<'(T>)>>)
Given a List of type T, where T implements IHasName, returns a string representation such as "Foo, Bar and Baz".
Public method Static member UniqueString
Returns a unique string in the context of the strings already in the collection. By default, if Dog exists in the list, and you pass in Dog, it will return Dog:1, then Dog:2 on the next call, and so on. Optionally, you can automatically update the list, and use a template for creating the new string.