SNAP Library 2.1, User Reference  2013-09-25 10:47:25
SNAP, a general purpose, high performance system for analysis and manipulation of large networks
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
anonymous_namespace{unicode.cpp} Namespace Reference

Classes

class  TVectorBuilder2
class  TVectorBuilder

Functions

TStr CombinePath (const TStr &s, const TStr &t)
void AssertEq (const TIntV &v1, const TIntV &v2, const TStr &explanation, FILE *f)

Variables

TVectorBuilder VB

Function Documentation

void anonymous_namespace{unicode.cpp}::AssertEq ( const TIntV v1,
const TIntV v2,
const TStr explanation,
FILE *  f 
)

Definition at line 39 of file unicode.cpp.

{
        const int n = v1.Len();
        bool ok = (n == v2.Len());
        if (ok) for (int i = 0; i < n && ok; i++) ok = ok && (v1[i] == v2[i]);
        if (! ok)
        {
                if (! f) f = stderr;
                fprintf(f, "%s: [", explanation.CStr());
                for (int i = 0; i < v1.Len(); i++) fprintf(f, "%s%04x", (i == 0 ? "" : " "), int(v1[i]));
                fprintf(f, "] != [");
                for (int i = 0; i < v2.Len(); i++) fprintf(f, "%s%04x", (i == 0 ? "" : " "), int(v2[i]));
                fprintf(f, "]\n");
                Fail;
        }
}
TStr anonymous_namespace{unicode.cpp}::CombinePath ( const TStr s,
const TStr t 
)

Definition at line 32 of file unicode.cpp.

{
        int n = s.Len(); if (n <= 0) return t;
        if (s[n - 1] == '\\' || s[n - 1] == '/' || s[n - 1] == ':') return s + t;
        return s + "\\" + t;
}

Variable Documentation

TVectorBuilder anonymous_namespace{unicode.cpp}::VB

Definition at line 30 of file unicode.cpp.