public TextReplacerValue(string value) { this._valueType = TextReplacerValueType.String; this._intValue = 0; this._floatValue = 0f; this._stringValue = value; }
public TextReplacerValue(float value) { this._valueType = TextReplacerValueType.Float; this._intValue = 0; this._floatValue = value; this._stringValue = string.Empty; }
public string GetValueString(int overflowLength, int zeroPadding, string overflowJoinString) { TextReplacerValueType valueType = this._valueType; if (valueType == TextReplacerValueType.Int) { return(this.GetOverflowClampString(this.GetZeroPaddingString(this.intValue.ToString(), zeroPadding), overflowLength, overflowJoinString)); } if (valueType != TextReplacerValueType.Float) { return(this.GetOverflowClampString(this.stringValue, overflowLength, overflowJoinString)); } return(this.GetOverflowClampString(this.GetZeroPaddingString(this.floatValue.ToString(), zeroPadding), overflowLength, overflowJoinString)); }