TModLoader v1.4.4.9
TModLoader source code documentation
Loading...
Searching...
No Matches

◆ FormatWith()

static string Terraria.Utils.FormatWith ( string original,
object obj )
inlinestatic

Definition at line 899 of file Utils.cs.

900 {
901 PropertyDescriptorCollection properties = TypeDescriptor.GetProperties(obj);
903 {
904 if (match.Groups[1].Length != 0)
905 {
906 return "";
907 }
908 string name = match.Groups[2].ToString();
909 PropertyDescriptor propertyDescriptor = properties.Find(name, ignoreCase: false);
910 return (propertyDescriptor != null) ? (propertyDescriptor.GetValue(obj) ?? "").ToString() : "";
911 });
912 }
static Regex _substitutionRegex
Definition Utils.cs:54

References Terraria.Utils._substitutionRegex.

Referenced by Terraria.UI.InGamePopups.PlayerWantsToJoinGamePopup.DrawInGame(), and Terraria.UI.InGamePopups.PlayerWantsToJoinGamePopup.DrawInNotificationsArea().

+ Here is the caller graph for this function: