Class FormatUtils
Helper class. Contains methods to parse attributes/values from strings.
Namespace: Febucci.UI.Core
Assembly: Febucci.TextAnimator.Runtime.dll
Syntax
public static class FormatUtils : object
Methods
ParseFloat(String, out Single)
Tries parsing a float given a string, independently of the system's culture
Declaration
public static bool ParseFloat(string value, out float result)
Parameters
Type | Name | Description |
---|---|---|
String | value | |
Single | result |
Returns
Type | Description |
---|---|
Boolean |
TryGetFloat(List<String>, Int32, Single, out Single)
Tries to parse a rich text tag parameter.
Declaration
public static bool TryGetFloat(List<string> attributes, int index, float defValue, out float result)
Parameters
Type | Name | Description |
---|---|---|
List<String> | attributes | list of all the attributesi in the rich text tag |
Int32 | index | the parameter's index in the list |
Single | defValue | default value, assigned if the parsing is not successful |
Single | result | result from the parsing |
Returns
Type | Description |
---|---|
Boolean |
|
Remarks
Mostly used in combination with custom typewriter actions. (Manual: Writing Custom actions C#)
TryGetFloat(String, Single, out Single)
Declaration
public static bool TryGetFloat(string attribute, float defValue, out float result)
Parameters
Type | Name | Description |
---|---|---|
String | attribute | |
Single | defValue | |
Single | result |
Returns
Type | Description |
---|---|
Boolean |