public int Write(char[] chars, ref int offset) { StringBuilder sb = new StringBuilder(MaxTagLength); sb.Append('{'); if (EnumCache <FFXIIITextTagCode> .IsDefined(Code)) { sb.Append(Code); } else { sb.Append("Var").AppendFormat(((byte)Code).ToString("X2")); } if (Param != null) { sb.Append(' '); sb.Append(Param); } sb.Append('}'); if (sb.Length > MaxTagLength) { throw Exceptions.CreateException(Lang.Error.Text.TooLongTagNameFormat, sb.ToString()); } for (int i = 0; i < sb.Length; i++) { chars[offset++] = sb[i]; } return(sb.Length); }
public override string ToString() { StringBuilder sb = new StringBuilder(MaxTagLength); sb.Append('{'); if (EnumCache <FFXIIITextTagCode> .IsDefined(Code)) { sb.Append(Code); } else { sb.Append("Var").AppendFormat(((byte)Code).ToString("X2")); } if (Param != null) { sb.Append(' '); sb.Append(Param); } sb.Append('}'); return(sb.ToString()); }