manpagez: man pages & more
html files: libgsf
Home | html | info | man

Text

Text

Synopsis

                    GsfInputTextline;
GsfInput *          gsf_input_textline_new              (GsfInput *source);
unsigned char *     gsf_input_textline_ascii_gets       (GsfInputTextline *textline);
guint8 *            gsf_input_textline_utf8_gets        (GsfInputTextline *textline);
                    GsfOutputIconv;
GsfOutput *         gsf_output_iconv_new                (GsfOutput *sink,
                                                         char const *dst,
                                                         char const *src);
                    GsfOutputCsv;
gboolean            gsf_output_csv_write_eol            (GsfOutputCsv *csv);
gboolean            gsf_output_csv_write_field          (GsfOutputCsv *csv,
                                                         char const *field,
                                                         size_t len);
enum                GsfOutputCsvQuotingMode;

Object Hierarchy

  GObject
   +----GsfInput
         +----GsfInputTextline
  GObject
   +----GsfOutput
         +----GsfOutputIconv
  GObject
   +----GsfOutput
         +----GsfOutputCsv

Properties

  "fallback"                 gchar*                : Read / Write
  "input-charset"            gchar*                : Read / Write / Construct Only
  "output-charset"           gchar*                : Read / Write / Construct Only
  "sink"                     GsfOutput*            : Read / Write / Construct Only
  "eol"                      gchar*                : Read / Write / Construct
  "quote"                    gchar*                : Read / Write / Construct
  "quoting-mode"             GsfOutputCsvQuotingMode  : Read / Write / Construct
  "quoting-on-whitespace"    gboolean              : Read / Write
  "quoting-triggers"         gchar*                : Read / Write
  "separator"                gchar*                : Read / Write / Construct
  "sink"                     GsfOutput*            : Read / Write

Description

Details

GsfInputTextline

typedef struct _GsfInputTextline GsfInputTextline;


gsf_input_textline_new ()

GsfInput *          gsf_input_textline_new              (GsfInput *source);

Note

This adds a reference to source.

source :

in some combination of ascii and utf8

Returns :

a new file or NULL.

gsf_input_textline_ascii_gets ()

unsigned char *     gsf_input_textline_ascii_gets       (GsfInputTextline *textline);

A utility routine to read things line by line from the underlying source. Trailing newlines and carriage returns are stripped, and the resultant buffer can be edited.

textline :

GsfInputTextline

Returns :

the string read, or NULL on eof.

gsf_input_textline_utf8_gets ()

guint8 *            gsf_input_textline_utf8_gets        (GsfInputTextline *textline);

A utility routine to read things line by line from the underlying source. Trailing newlines and carriage returns are stripped, and the resultant buffer can be edited.

textline :

GsfInputTextline

Returns :

the string read, or NULL on eof.

GsfOutputIconv

typedef struct _GsfOutputIconv GsfOutputIconv;


gsf_output_iconv_new ()

GsfOutput *         gsf_output_iconv_new                (GsfOutput *sink,
                                                         char const *dst,
                                                         char const *src);

Adds a reference to sink.

sink :

The underlying data source.

dst :

The target character set.

src :

The source character set.

Returns :

a new GsfOutput object or NULL.

GsfOutputCsv

typedef struct _GsfOutputCsv GsfOutputCsv;


gsf_output_csv_write_eol ()

gboolean            gsf_output_csv_write_eol            (GsfOutputCsv *csv);


gsf_output_csv_write_field ()

gboolean            gsf_output_csv_write_field          (GsfOutputCsv *csv,
                                                         char const *field,
                                                         size_t len);


enum GsfOutputCsvQuotingMode

typedef enum {
	GSF_OUTPUT_CSV_QUOTING_MODE_NEVER,
	GSF_OUTPUT_CSV_QUOTING_MODE_AUTO,
	GSF_OUTPUT_CSV_QUOTING_MODE_ALWAYS
} GsfOutputCsvQuotingMode;

Controls when to add quotes around fields.

GSF_OUTPUT_CSV_QUOTING_MODE_NEVER

never add quotes around fields

GSF_OUTPUT_CSV_QUOTING_MODE_AUTO

add quotes around fields when needed

GSF_OUTPUT_CSV_QUOTING_MODE_ALWAYS

always add quotes around fields

Property Details

The "fallback" property

  "fallback"                 gchar*                : Read / Write

Either NULL or a UTF-8 string (representable in the target encoding) to convert and output in place of characters that cannot be represented in the target encoding. NULL means use \u1234 or \U12345678 format.

Default value: NULL


The "input-charset" property

  "input-charset"            gchar*                : Read / Write / Construct Only

The character set to convert from.

Default value: "UTF-8"


The "output-charset" property

  "output-charset"           gchar*                : Read / Write / Construct Only

The character set to convert to.

Default value: "UTF-8"


The "sink" property

  "sink"                     GsfOutput*            : Read / Write / Construct Only

Where the converted data is written.


The "eol" property

  "eol"                      gchar*                : Read / Write / Construct

The end-of-line marker.

Default value: "\n"


The "quote" property

  "quote"                    gchar*                : Read / Write / Construct

The string used for quoting fields.

Default value: "\""


The "quoting-mode" property

  "quoting-mode"             GsfOutputCsvQuotingMode  : Read / Write / Construct

When to quote fields.

Default value: GSF_OUTPUT_CSV_QUOTING_MODE_NEVER


The "quoting-on-whitespace" property

  "quoting-on-whitespace"    gboolean              : Read / Write

Does initial or terminal whitespace force quoting?.

Default value: TRUE


The "quoting-triggers" property

  "quoting-triggers"         gchar*                : Read / Write

Characters that cause field quoting.

Default value: NULL


The "separator" property

  "separator"                gchar*                : Read / Write / Construct

The field separator.

Default value: ","


The "sink" property

  "sink"                     GsfOutput*            : Read / Write

Where the formatted output is written.

© manpagez.com 2000-2024
Individual documents may contain additional copyright information.