-static inline bool HasMarkup( const std::string& markupString )
-{
- // Reset counters
- unsigned int lessThanCount = 0;
- unsigned int greaterThanCount = 0;
-
- // Check to see if any markup command surrounds are of equal number and not zero
- for ( std::string::const_iterator it = markupString.begin(); it != markupString.end(); ++it )
- {
- if ( *it == LESS_THAN )
- {
- lessThanCount++;
- }
- else
- {
- if ( *it == GREATER_THAN )
- {
- greaterThanCount++;
- }
- else
- {
- if ( *it == BACK_SLASH )
- {
- return true;
- }
- }
- }
- }
- if ( !lessThanCount || !greaterThanCount || lessThanCount != greaterThanCount )
- {
- return false;
- }
- return true;
-}
-