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 const char*
 

String to write.

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

Return value

Returns: int
 

0 on success, -1 on error.