Myre.UI.Text.StringPart.Equals C# (CSharp) Méthode

Equals() public méthode

public Equals ( StringBuilder other ) : bool
other StringBuilder
Résultat bool
        public bool Equals(StringBuilder other)
        {
            return Equals(other, 0, other.Length);
        }

Same methods

StringPart::Equals ( StringBuilder other, int start, int length ) : bool
StringPart::Equals ( StringPart other ) : bool
StringPart::Equals ( object obj ) : bool
StringPart::Equals ( string other ) : bool

Usage Example

Exemple #1
0
        private static TagType ParseTag(StringPart text, ref Vector2 position, ref int lineSpacing, ref int lineIndex)
        {
            var type = TagType.None;

            if (text.Equals("\n"))
            {
                NewLine(ref position, ref lineSpacing, ref lineIndex);
                type = TagType.NewLine;
            }
            else if (text.StartsWith("f:") && fonts != null)
            {
                var        fontName = text.Substring(2);
                SpriteFont font;
                if (fonts.TryParse(fontName, out font))
                {
                    PushFont(font);
                    type = TagType.FontStart;
                }
            }
            else if (text.Equals("/f"))
            {
                PopFont();
                type = TagType.FontEnd;
            }
            else if (text.StartsWith("c:"))
            {
                var   colourName = text.Substring(2);
                Color colour;
                if (ColourParser.TryParse(colourName, out colour))
                {
                    PushColour(colour);
                    type = TagType.ColourStart;
                }
            }
            else if (text.Equals("/c"))
            {
                PopColour();
                type = TagType.ColourEnd;
            }

            return(type);
        }
All Usage Examples Of Myre.UI.Text.StringPart::Equals