Skip to content

ergofriend/ml2array

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 

Repository files navigation

Golang: multiline string to []string

Installation

go get github.com/ergofriend/ml2array

Usage

package main

import (
	"fmt"

	"github.com/ergofriend/ml2array"
)

func main() {
	input := `4 5 2
0 1 2 1
0 2 1 2
1 2 1 1
1 3 1 3
2 3 2 1`

	result := ml2array.Make(input)

	for i := 0; i < len(result); i++ {
		fmt.Printf("%d行目: %s\n", i, result[i])
	}

}

Releases

No releases published

Packages

No packages published

Languages