Programming Languages, Martials Arts and Computers. The Weblog of Chris Double.
if (source->GetAttr(kNameSpaceID_None, nsGkAtoms::type, type)) {
}
To compare a string against a literal value:
nsAutoString type = ...;
if (type.EqualsLiteral("application/ogg")) {
...
}
nsAutoString type = ...;
printf("Type is %s\n", NS_LossyConvertUTF16toASCII(type).get());