Click here to Skip to main content
Click here to Skip to main content
Articles » Languages » C# » General » Downloads
 
Add your own
alternative version

A managed wrapper for the HTML Tidy library

, 12 Jan 2007
A managed C++ for a small part of the HTML Tidy C library
zetahtmltidy_src.zip
ZetaHtmlTidy
DLL
release
mt.dep
ZetaHtmlTidy.dll
ZetaHtmlTidy.dll.intermediate.manifest
HtmlTidy
build
gmake
Makefile
gnuauto
configure.in
console
Makefile.am
include
Makefile.am
Makefile.am
setup.sh
src
Makefile.am
msvc
debug
mt.dep
tidy.exe.embed.manifest
tidy.exe.embed.manifest.res
tidy.exe.intermediate.manifest
DebugDLL
libtidy.dll.embed.manifest
libtidy.dll.embed.manifest.res
libtidy.dll.intermediate.manifest
libtidy.exp
mt.dep
MakeDLL.vc6
Makefile.vc6
release
libtidy.lib
mt.dep
tidy.exe.intermediate.manifest
tidy.map
releasedll
tidy.dsp
tidy.dsw
tidydll.dsp
tidylib.dsp
rpm
tidy.spec
console
include
src
Test
bin
Debug
Release
ZetaHtmlTidy.dll
obj
Debug
ResolveAssemblyReference.cache
TempPE
Release
ResolveAssemblyReference.cache
TempPE
Properties
#ifndef __TMBSTR_H__
#define __TMBSTR_H__

/* tmbstr.h - Tidy string utility functions

  (c) 1998-2004 (W3C) MIT, ERCIM, Keio University
  See tidy.h for the copyright notice.

  CVS Info :

    $Author: arnaud02 $ 
    $Date: 2004/12/06 15:05:29 $ 
    $Revision: 1.8 $ 

*/

#include "platform.h"

#ifdef __cplusplus
extern "C"
{
#endif

/* like strdup but using MemAlloc */
tmbstr tmbstrdup( ctmbstr str );

/* like strndup but using MemAlloc */
tmbstr tmbstrndup( ctmbstr str, uint len);

/* exactly same as strncpy */
uint tmbstrncpy( tmbstr s1, ctmbstr s2, uint size );

uint tmbstrcpy( tmbstr s1, ctmbstr s2 );

uint tmbstrcat( tmbstr s1, ctmbstr s2 );

/* exactly same as strcmp */
int tmbstrcmp( ctmbstr s1, ctmbstr s2 );

/* returns byte count, not char count */
uint tmbstrlen( ctmbstr str );

/*
  MS C 4.2 doesn't include strcasecmp.
  Note that tolower and toupper won't
  work on chars > 127.

  Neither do Lexer.ToLower() or Lexer.ToUpper()!

  We get away with this because, except for XML tags,
  we are always comparing to ascii element and
  attribute names defined by HTML specs.
*/
int tmbstrcasecmp( ctmbstr s1, ctmbstr s2 );

int tmbstrncmp( ctmbstr s1, ctmbstr s2, uint n );

int tmbstrncasecmp( ctmbstr s1, ctmbstr s2, uint n );

/* return offset of cc from beginning of s1,
** -1 if not found.
*/
int tmbstrnchr( ctmbstr s1, uint len1, tmbchar cc );

ctmbstr tmbsubstrn( ctmbstr s1, uint len1, ctmbstr s2 );
ctmbstr tmbsubstrncase( ctmbstr s1, uint len1, ctmbstr s2 );
ctmbstr tmbsubstr( ctmbstr s1, ctmbstr s2 );

/* transform string to lower case */
tmbstr tmbstrtolower( tmbstr s );

/* Transform ASCII chars in string to upper case */
tmbstr tmbstrtoupper(tmbstr s);

Bool tmbsamefile( ctmbstr filename1, ctmbstr filename2 );

int tmbvsnprintf(tmbstr buffer, size_t count, ctmbstr format, va_list args)
#ifdef __GNUC__
__attribute__((format(printf, 3, 0)))
#endif
;
int tmbsnprintf(tmbstr buffer, size_t count, ctmbstr format, ...)
#ifdef __GNUC__
__attribute__((format(printf, 3, 4)))
#endif
;

#ifdef __cplusplus
}  /* extern "C" */
#endif

#endif /* __TMBSTR_H__ */

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

About the Author

Uwe Keim
Chief Technology Officer Zeta Producer Desktop CMS
Germany Germany
Uwe does programming since 1989 with experiences in Assembler, C++, MFC and lots of web- and database stuff and now uses ASP.NET and C# extensively, too. He has also teached programming to students at the local university.
 
In his free time, he does climbing, running and mountain biking. Recently he became a father of a cute boy.
 
Some cool, free software from us:
 
Free Test Management Software - Intuitive, competitive, Test Plans. Download now!  
Homepage erstellen - Intuitive, very easy to use. Download now!  
Send large Files online for free by Email
Offline-Homepage-Baukasten

| Advertise | Privacy | Mobile
Web04 | 2.8.140721.1 | Last Updated 12 Jan 2007
Article Copyright 2007 by Uwe Keim
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid