/// <summary> /// Extracts the tag name from the original_text field of an element or token by /// stripping off </> characters and attributes and adjusting the passed-in /// GumboStringPiece appropriately. The tag name is in the original case and /// shares a buffer with the original text, to simplify memory management. /// Behavior is undefined if a string-piece that doesn't represent an HTML tag /// (<tagname> or </tagname>) is passed in. If the string piece is completely /// empty (NULL data pointer), then this function will exit successfully as a /// no-op. /// </summary> /// <param name="text"></param> [DllImport(LibraryName, CallingConvention = CallingConvention.Cdecl)] public static extern void gumbo_tag_from_original_text(ref GumboStringPiece text);
public static string MarshalToString(this GumboStringPiece stringPiece) => NativeUtf8.StringFromNativeUtf8(stringPiece.data, (int)stringPiece.length);
public static extern void gumbo_tag_from_original_text(ref GumboStringPiece text);
public static string MarshalToString(this GumboStringPiece stringPiece) { return(NativeUtf8Helper.StringFromNativeUtf8(stringPiece.data, (int)stringPiece.length)); }