44static char *
StrNDup(
const char *z,
int n);
47static char *Trim(
char *z);
63 if (
n > 0 &&
zUri[
n] ==
':') {
188 if (
zInit[
n] != z[
n])
return 0;
191 for (i = 0;
zTerm[i]; ++i) {
192 if (z[
n] ==
zTerm[i])
return n;
261static char *Trim(
char *z)
270 zNew =
new char[i + 1];
271 if (
zNew == 0)
return 0;
289 if (
zUri == 0 || *
zUri == 0)
return 0;
299 if (
term->fZScheme == 0 &&
300 term->fZAuthority == 0 &&
302 term->fZQuery == 0 &&
305 }
else if (
term->fZScheme) {
310 }
else if (
term->fZAuthority) {
315 }
else if (
term->fZPath && (
term->fZPath[0] ==
'/' || base->
fZPath == 0)) {
328 for (i = 0;
zBuf[i]; i++) {
329 if (
zBuf[i] ==
'/' &&
zBuf[i+1] ==
'.' &&
zBuf[i+2] ==
'/') {
335 if (
zBuf[i] ==
'/' &&
zBuf[i+1] ==
'.' &&
zBuf[i+2] == 0) {
339 if (i > 0 &&
zBuf[i] ==
'/' &&
zBuf[i+1] ==
'.' &&
340 zBuf[i+2] ==
'.' && (
zBuf[i+3] ==
'/' ||
zBuf[i+3] == 0)) {
341 for (
j = i - 1;
j >= 0 &&
zBuf[
j] !=
'/'; --
j) {}
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
static char * StrNDup(const char *z, int n)
Duplicate a string of length n.
static void ReplaceStr(char **pzDest, const char *zSrc)
Replace the string in *pzDest with the string in zSrc.
#define URI_FRAGMENT_MASK
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t result
char * StrDup(const char *str)
Duplicate the string str.
~TGHtmlUri() override
Html uri destructor.
int ComponentLength(const char *z, const char *zInit, const char *zTerm)
Return the length of the next component of the URL in z[] given that the component starts at z[0].
int EqualsUri(const TGHtmlUri *uri, int field_mask=((1<< 0)|(1<< 1)|(1<< 2)|(1<< 3)|(1<< 4)))
Compare another uri with given field mask.
char * BuildUri()
Create a string to hold the given URI.
TGHtmlUri(const TGHtmlUri &)=delete
virtual char * ResolveUri(const char *uri)
This function resolves the specified URI and returns the result in a newly allocated string.
const char * Data() const
TString & Append(const char *cs)
static TString Format(const char *fmt,...)
Static method which formats a string using a printf style format descriptor and return a TString.