Exemple #1
0
        /// <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);
        }
Exemple #2
0
        /// <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);
        }
Exemple #3
0
        /// <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);
        }
Exemple #4
0
        /// <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);
        }
Exemple #5
0
        public static FText GetEmpty()
        {
            FText result = new FText();

            Native_FText.CreateEmpty(result.nativeAddress);
            return(result);
        }
Exemple #6
0
 /// <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);
     }
 }
Exemple #7
0
 public override string ToString()
 {
     using (FStringUnsafe resultUnsafe = new FStringUnsafe())
     {
         Native_FText.ToString(nativeAddress, ref resultUnsafe.Array);
         return(resultUnsafe.Value);
     }
 }
Exemple #8
0
 /// <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);
     }
 }
Exemple #9
0
 /// <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);
     }
 }
Exemple #10
0
 /// <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);
     }
 }
Exemple #11
0
 /// <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);
     }
 }
Exemple #12
0
 /// <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);
             }
 }
Exemple #13
0
        /// <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);
        }
Exemple #14
0
 public bool ShouldGatherForLocalization()
 {
     return(Native_FText.ShouldGatherForLocalization(nativeAddress));
 }
Exemple #15
0
 public bool Equals(FText other, ETextComparisonLevel comparisonLevel)
 {
     return(Native_FText.EqualTo(nativeAddress, other.nativeAddress, comparisonLevel));
 }
Exemple #16
0
 public bool IsCultureInvariant()
 {
     return(Native_FText.IsCultureInvariant(nativeAddress));
 }
Exemple #17
0
 public bool IsFromStringTable()
 {
     return(Native_FText.IsFromStringTable(nativeAddress));
 }
Exemple #18
0
 public bool IsNumeric()
 {
     return(Native_FText.IsNumeric(nativeAddress));
 }
Exemple #19
0
 public bool IsTransient()
 {
     return(Native_FText.IsTransient(nativeAddress));
 }
Exemple #20
0
 public int CompareTo(FText other, ETextComparisonLevel comparisonLevel)
 {
     return(Native_FText.CompareTo(nativeAddress, other.nativeAddress, comparisonLevel));
 }
Exemple #21
0
 public bool IsEmptyOrWhitespace()
 {
     return(Native_FText.IsEmptyOrWhitespace(nativeAddress));
 }
Exemple #22
0
 public bool IsEmpty()
 {
     return(Native_FText.IsEmpty(nativeAddress));
 }
Exemple #23
0
 /// <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));
 }
Exemple #24
0
 public bool EqualToCaseIgnored(FText other)
 {
     return(Native_FText.EqualToCaseIgnored(nativeAddress, other.nativeAddress));
 }