/// <summary> /// Transforms the text to uppercase in a culture correct way. /// @note The returned instance is linked to the original and will be rebuilt if the active culture is changed. /// </summary> /// <returns></returns> public FText ToUpper() { FText result = new FText(); Native_FText.ToUpper(nativeAddress, result.nativeAddress); return(result); }
/// <summary> /// Generate a culture invariant FText representing the passed in FText /// </summary> public static FText AsCultureInvariant(FText text) { FText result = new FText(); Native_FText.AsCultureInvariantText(text.nativeAddress, result.nativeAddress); return(result); }
/// <summary> /// Does both of the above without needing to create an additional FText in the interim. /// </summary> public FText TrimPrecedingAndTrailing() { FText result = new FText(); Native_FText.TrimTrailing(nativeAddress, result.nativeAddress); return(result); }
/// <summary> /// Generate an FText representing the pass name /// </summary> public static FText FromName(FName name) { FText result = new FText(); Native_FText.FromName(ref name, result.nativeAddress); return(result); }
public static FText GetEmpty() { FText result = new FText(); Native_FText.CreateEmpty(result.nativeAddress); return(result); }
/// <summary> /// Deep build of the source string for this FText, climbing the history hierarchy /// </summary> public string BuildSourceString() { using (FStringUnsafe resultUnsafe = new FStringUnsafe()) { Native_FText.BuildSourceString(nativeAddress, ref resultUnsafe.Array); return(resultUnsafe.Value); } }
public override string ToString() { using (FStringUnsafe resultUnsafe = new FStringUnsafe()) { Native_FText.ToString(nativeAddress, ref resultUnsafe.Array); return(resultUnsafe.Value); } }
/// <summary> /// Gets the time zone string that represents a non-specific, zero offset, culture invariant time zone. /// </summary> public static string GetInvariantTimeZone() { using (FStringUnsafe resultUnsafe = new FStringUnsafe()) { Native_FText.GetInvariantTimeZone(ref resultUnsafe.Array); return(resultUnsafe.Value); } }
/// <summary> /// Generate a culture invariant FText representing the passed in string /// </summary> public static FText AsCultureInvariant(string str) { using (FStringUnsafe strUnsafe = new FStringUnsafe(str)) { FText result = new FText(); Native_FText.AsCultureInvariant(ref strUnsafe.Array, result.nativeAddress); return(result); } }
/// <summary> /// Generate an FText representing the passed in string /// </summary> public static FText FromString(string str) { using (FStringUnsafe strUnsafe = new FStringUnsafe(str)) { FText result = new FText(); Native_FText.FromString(ref strUnsafe.Array, result.nativeAddress); return(result); } }
/// <summary> /// Attempts to create an FText instance from a string table ID and key (this is the same as the LOCTABLE macro, except this can also work with non-literal string values). /// </summary> /// <returns>The found text, or an dummy FText if not found.</returns> public static FText FromStringTable(FName tableId, string key, EStringTableLoadingPolicy loadingPolicy) { using (FStringUnsafe keyUnsafe = new FStringUnsafe(key)) { FText result = new FText(); Native_FText.FromStringTable(ref tableId, ref keyUnsafe.Array, loadingPolicy, result.nativeAddress); return(result); } }
/// <summary> /// This is the equivalent of LOCTEXT(). The text will be cached by FTextCache and wont be removed until FTextCache::Flush /// is called - which by default only happens in FInternationalization::TearDown when the application is closed (FEngineLoop::AppExit) /// </summary> public static FText Create(string nameSpace, string key, string literal) { using (FStringUnsafe nameSpaceUnsafe = new FStringUnsafe(nameSpace)) using (FStringUnsafe keyUnsafe = new FStringUnsafe(key)) using (FStringUnsafe literalUnsafe = new FStringUnsafe(literal)) { FText result = new FText(); Native_FText.CreateText(ref nameSpaceUnsafe.Array, ref keyUnsafe.Array, ref literalUnsafe.Array, result.nativeAddress); return(result); } }
/// <summary> /// Constructs a new FText with the SourceString of the specified text but with the specified namespace and key /// </summary> public FText ChangeKey(string nameSpace, string key) { FText result = new FText(); // WITH_EDITOR if (Native_FText.ChangeKey != null) { using (FStringUnsafe nameSpaceUnsafe = new FStringUnsafe(nameSpace)) using (FStringUnsafe keyUnsafe = new FStringUnsafe(key)) { Native_FText.ChangeKey(ref nameSpaceUnsafe.Array, ref keyUnsafe.Array, nativeAddress, result.nativeAddress); } } return(result); }
public bool ShouldGatherForLocalization() { return(Native_FText.ShouldGatherForLocalization(nativeAddress)); }
public bool Equals(FText other, ETextComparisonLevel comparisonLevel) { return(Native_FText.EqualTo(nativeAddress, other.nativeAddress, comparisonLevel)); }
public bool IsCultureInvariant() { return(Native_FText.IsCultureInvariant(nativeAddress)); }
public bool IsFromStringTable() { return(Native_FText.IsFromStringTable(nativeAddress)); }
public bool IsNumeric() { return(Native_FText.IsNumeric(nativeAddress)); }
public bool IsTransient() { return(Native_FText.IsTransient(nativeAddress)); }
public int CompareTo(FText other, ETextComparisonLevel comparisonLevel) { return(Native_FText.CompareTo(nativeAddress, other.nativeAddress, comparisonLevel)); }
public bool IsEmptyOrWhitespace() { return(Native_FText.IsEmptyOrWhitespace(nativeAddress)); }
public bool IsEmpty() { return(Native_FText.IsEmpty(nativeAddress)); }
/// <summary> /// Check to see if this FText is identical to the other FText /// /// Note: This doesn't compare the text, but only checks that the internal string pointers have the same target (which makes it very fast!) /// If you actually want to perform a lexical comparison, then you need to use EqualTo instead /// </summary> /// <returns></returns> public bool IdenticalTo(FText other) { return(Native_FText.IdenticalTo(nativeAddress, other.nativeAddress)); }
public bool EqualToCaseIgnored(FText other) { return(Native_FText.EqualToCaseIgnored(nativeAddress, other.nativeAddress)); }