Method in MarkupParseResult


Returns the substring of Text covered by attribute Position and Length properties.

public string TextForAttribute(MarkupAttribute attribute)


If the attribute's Length property is zero, this method returns the empty string.

This method does not check to see if attribute is an attribute belonging to this MarkupParseResult. As a result, if you pass an attribute that doesn't belong, it may describe a range of text that does not appear in Text. If this occurs, an System.IndexOutOfRangeException will be thrown.



The attribute to get the text for.


The text contained within the attribute.

Last updated

Yarn Spinnerยฎ and Secret Labยฎ are trade marks of Secret Lab Pty. Ltd., and are used by Yarn Spinner Pty. Ltd. under license.