### Class

# Vips Sbuf

#### Description [src]

    class Vips.Sbuf : Vips.Object
    {
      /* No available fields */
    }

A `VipsSbuf` provides a buffered reading interface for a `VipsSource`.

You can fetch lines of text, skip whitespace, and so on.

It is useful for implementing things like CSV readers, for example.

#### Hierarchy

#### Ancestors

- VipsObject
- GObject

#### Constructors

###### vips_sbuf_new_from_source

Create a `VipsSbuf` wrapping a source.

#### Instance methods

###### vips_sbuf_get_line

Fetch the next line of text from `sbuf` and return it. The end of line character (or characters, for DOS files) are removed, and the string is terminated with a null (`\0` character).

###### vips_sbuf_get_line_copy

Fetch the next line of text from `sbuf` and return it. The end of line character (or characters, for DOS files) are removed, and the string is terminated with a null (`\0` character).

###### vips_sbuf_get_non_whitespace

Fetch the next chunk of non-whitespace text from the source, and null-terminate it.

###### vips_sbuf_getc

Fetch the next character from the source.

###### vips_sbuf_require

Make sure there are at least `require` bytes of readahead available.

###### vips_sbuf_skip_whitespace

After this, the next getc will be the first char of the next block of non-whitespace (or EOF).

###### vips_sbuf_unbuffer

Discard the input buffer and reset the read point. You must call this before using read or seek on the underlying `VipsSource` class.

###### vips_sbuf_ungetc

The opposite of `vips_sbuf_getc()`: undo the previous getc.

##### Methods inherited from VipsObject (27)

Please see VipsObject for a full list of methods.

##### Methods inherited from GObject (43)

Please see GObject for a full list of methods.

#### Properties

###### Vips.Sbuf:input

No description available.

##### Properties inherited from VipsObject (2)

###### Vips.Object:description

No description available.

###### Vips.Object:nickname

No description available.

#### Signals

##### Signals inherited from VipsObject (4)

###### VipsObject::close

The ::close signal is emitted once during object close. The object is dying and may not work.

###### VipsObject::postbuild

The ::postbuild signal is emitted once just after successful object construction. Return non-zero to cause object construction to fail.

###### VipsObject::postclose

The ::postclose signal is emitted once after object close. The object pointer is still valid, but nothing else.

###### VipsObject::preclose

The ::preclose signal is emitted once just before object close starts. The object is still alive.

##### Signals inherited from GObject (1)

###### GObject::notify

The notify signal is emitted on an object when one of its properties has its value set through g_object_set_property(), g_object_set(), et al.

#### Class structure

    struct VipsSbufClass {
      VipsObjectClass parent_class;

    }

No description available.

###### Class members

`parent_class: VipsObjectClass`

  No description available.