Click or drag to resize

ResourceShortTypeFormat Method (String)

Formats the value into a human friendly localized string.

Namespace:  KSPDev.GUIUtils.TypeFormatters
Assembly:  KSPDev_Utils.1.0 (in KSPDev_Utils.1.0.dll) Version: 1.0 for KSP v1.6+
Syntax
C#
public static string Format(
	string resourceName
)
Request Example View Source

Parameters

resourceName
Type: SystemString
The name of the resource to format.

Return Value

Type: String
A formatted and localized string.
Examples
Debug.Log(ResourceShortType.Format(StockResourceNames.ElectricCharge));
// Prints: "Resource is: EC"
Debug.Log(ResourceShortType.Format(PartResourceLibrary.ElectricityHashcode));
// Prints: "Resource is: EC"
See Also