Method

VipsTargetwrite_amp

Declaration [src]

int
vips_target_write_amp (
  VipsTarget* target,
  const char* str
)

Description [src]

Write str to target, but escape stuff that xml hates in text. Our argument string is utf-8.

XML rules:

  • We must escape &<>
  • Don’t escape \n, \t, \r
  • Do escape the other ASCII codes.

Parameters

str

Type: const char*

String to write.

The data is owned by the caller of the method.
The value is a NUL terminated UTF-8 string.

Return value

Type: int

0 on success, -1 on error.