When sending or receiving strings in nim, I'm not sure how to slice the part of the string I want to use.
Example in python:
import os
enter_some_characters = input(str("Enter a string of 10 characters > "))
first_group_of_characters = enter_some_characters[:5]
second_group_of_characters = enter_some_characters[5:]
print("First group of characters:", first_group_of_characters)
print("Second group of characters:", second_group_of_characters)
Trying to do this in nim to slice the characters but not finding the information about how to do it.
Thanks
I could only find the documentation for slicing a seq, but it works the same way:
let s = "1234567890"
echo s[0..4]
echo s[5..^1]