URL
https://opencores.org/ocsvn/openrisc/openrisc/trunk
Subversion Repositories openrisc
[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [libgo/] [go/] [syscall/] [str.go] - Rev 867
Go to most recent revision | Compare with Previous | Blame | View Log
// Copyright 2009 The Go Authors. All rights reserved.// Use of this source code is governed by a BSD-style// license that can be found in the LICENSE file.package syscallfunc itoa(val int) string { // do it here rather than with fmt to avoid dependencyif val < 0 {return "-" + itoa(-val)}var buf [32]byte // big enough for int64i := len(buf) - 1for val >= 10 {buf[i] = byte(val%10 + '0')i--val /= 10}buf[i] = byte(val + '0')return string(buf[i:])}
Go to most recent revision | Compare with Previous | Blame | View Log
