{"id":1785,"date":"2020-03-22T17:42:17","date_gmt":"2020-03-22T17:42:17","guid":{"rendered":"https:\/\/golangbyexamples.com\/?p=1785"},"modified":"2020-03-22T17:42:27","modified_gmt":"2020-03-22T17:42:27","slug":"golang-delete-index-string","status":"publish","type":"post","link":"https:\/\/golangbyexamples.com\/golang-delete-index-string\/","title":{"rendered":"Delete in a string by index in Go (Golang)"},"content":{"rendered":"\n
In Golang string is a sequence of bytes. A string literal actually represents a UTF-8 sequence of bytes. In UTF-8, ASCII characters are single-byte corresponding to the first 128 Unicode characters.\u00a0All other characters are between 1 -4 bytes. Due to this, it is not possible to index a character in a string.\u00a0 In GO, rune data type represents a Unicode point.\u00a0 Once a string is converted to an array of rune then it is possible to index a character in that array of rune. <\/p>\n\n\n\n