Example #1
0
 /// <summary>
 /// Extracts the tag name from the original_text field of an element or token by
 /// stripping off &lt;/&gt; 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
 /// (&lt;tagname&gt; or &lt;/tagname&gt;) 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);
Example #2
0
 public static string MarshalToString(this GumboStringPiece stringPiece) => NativeUtf8.StringFromNativeUtf8(stringPiece.data, (int)stringPiece.length);
Example #3
0
 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));
 }