1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

doc: fix titles (#7590)

This commit is contained in:
Stéphane Aulery 2020-12-28 19:29:58 +01:00 committed by GitHub
parent cf441091f1
commit 954580f8ca
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -48,7 +48,6 @@ Anything you can do in other languages, you can do in V.
</td><td width=33% valign=top>
* [println and other builtin functions](#println-and-other-builtin-functions)
* [Functions 2](#functions-2)
* [Pure functions by default](#pure-functions-by-default)
* [Mutable arguments](#mutable-arguments)
@ -56,6 +55,8 @@ Anything you can do in other languages, you can do in V.
* [References](#references)
* [Modules](#modules)
* [Constants](#constants)
* [Builtin functions](#builtin-functions)
* [Printing custom types](#printing-custom-types)
* [Types 2](#types-2)
* [Interfaces](#interfaces)
* [Enums](#enums)
@ -1646,6 +1647,8 @@ println([1,2,3]) // "[1, 2, 3]"
println(User{name:'Bob', age:20}) // "User{name:'Bob', age:20}"
```
## Custom print of types
If you want to define a custom print value for your type, simply define a
`.str() string` method: