netparse

package module
v0.0.0-...-001002a Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 29, 2014 License: BSD-3-Clause Imports: 2 Imported by: 0

README

netparse

A simple copy / export of http://golang.org/src/pkg/net/parse.go

Thanks to all golang team

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ByteIndex

func ByteIndex(s string, c byte) int

func Count

func Count(s string, b byte) int

Number of occurrences of b in s.

func CountAnyByte

func CountAnyByte(s string, t string) int

Count occurrences in s of any bytes in t.

func Dtoi

func Dtoi(s string, i0 int) (n int, i int, ok bool)

Decimal to integer starting at &s[i0]. Returns number, new offset, success.

func GetFields

func GetFields(s string) []string

func Itoa

func Itoa(i int) string

Integer to decimal.

func Itod

func Itod(i uint) string

Convert i to decimal string.

func Itox

func Itox(i uint, min int) string

Convert i to hexadecimal string.

func Last

func Last(s string, b byte) int

Index of rightmost occurrence of b in s.

func SplitAtBytes

func SplitAtBytes(s string, t string) []string

Split s at any bytes in t.

func Xtoi

func Xtoi(s string, i0 int) (n int, i int, ok bool)

Hexadecimal to integer starting at &s[i0]. Returns number, new offset, success.

func Xtoi2

func Xtoi2(s string, e byte) (byte, bool)

xtoi2 converts the next two hex digits of s into a byte. If s is longer than 2 bytes then the third byte must be e. If the first two bytes of s are not hex digits or the third byte does not match e, false is returned.

Types

type File

type File struct {
	// contains filtered or unexported fields
}

func Open

func Open(name string) (*File, error)

func (*File) Close

func (f *File) Close()

func (*File) GetLineFromData

func (f *File) GetLineFromData() (s string, ok bool)

func (*File) ReadLine

func (f *File) ReadLine() (s string, ok bool)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL