Strings In 'Go'(Learn 'Go' - Part 5)

in #programming6 years ago

There are many data types that you will be using while programming in Go like Strings, Numbers, Booleans and more.

Let's begin with the "Strings".

 
 

Strings is a sequence of characters that represent text. We use the "double quotes" to represent the Strings. We can use the Strings to represent text, concatenate, i.e. to combine text with text or text with numbers as well.

 

For instance, We can also get the "Hello World!" output with

 

fmt.Println("Hello" + "World!")

 

Here we have two Strings, "Hello" & "World!" concatenated.

We use the '+' symbol for concatenation besides the addition as well. The compiler figures out automatically what to do with the symbol based on the argument.


 
 
 

Previous Posts In The Series

 
 

Introduction To 'Go' Programming Language(Learn 'Go' - Part 1)

 

25 Basic Keywords Of The Go Programming Language (Learn 'Go' - Part 2)

 

How To Set The Go Programming Environment On Your System?(Learn 'Go' - Part 3)

 

Create Your First Program In Go Language (Learn 'Go' - Part 4)


 
 

Upcoming Posts

 

Booleans In 'Go'(Learn 'Go' - Part 6)

Coin Marketplace

STEEM 0.29
TRX 0.12
JST 0.032
BTC 60844.65
ETH 2995.69
USDT 1.00
SBD 3.88