Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Reader ¶
type Reader interface { // Indicates when end of string has been read. Eos() bool // Last character read. Char() rune // Returns the String Reader is reading. Base() String // Returns the position of Reader in the String. Pos() int // Sets the position of Reader at pos. pos must verify 0 <= pos <= Reader.Base().Length(). SetPos(pos int) // Reads a character at the position of Reader and advances Reader to the next position. If the end of the string has been reached, Eos() returns true and Char() returns eOS. Read() // Does just as Reader.Read but returns the character read. ReadChar() rune // Reads at most length characters by repetition of Read(). ReadString(length int) string }
type String ¶
type String interface { // Creates and returns a new reader of the String, positionned at 0. NewReader() Reader // Creates and returns a new writer of the String, positionned at its end. NewWriter() Writer // Returns the length of the String. Length() int // Returns the position of the first occurrence of target in the String, after the position beg. Returns -1 if not found. Pos(beg int, target string) int // Sets the value of the String to st. Set(st string) // Returns the concatenation of the String and of s. Cat(s String) String // Returns the String with src inserted at position pos. The String is not modified, nor src. If pos < 0, pos == 0 is assumed; if pos > String.Length(), pos == String.Length() is assumed. Insert(pos int, src String) String // Extracts and returns the substring of the String beginning at position pos and of length length. Extract(pos, length int) String // Copies and returns the String. Copy() String // Converts the String into a string. Convert() string }
String of rune(s)
type Writer ¶
type Writer interface { // Returns the string Writer is writing. Base() String // Returns the position of Writer. Pos() int // Sets the position of Writer at pos. pos must verify 0 <= pos <= Writer.Base().Length(). SetPos(pos int) // Writes the character c at the position of Writer and advances Writer to the next position. If the end of the string has been reached, c is appended to the string. WriteChar(c rune) // Writes the string s by repetition of WriteChar(). WriteString(s string) }
Click to show internal directories.
Click to hide internal directories.