C
C#2mo ago
Avnitro

✅ Strings

StringBuilder newCrustacean = new StringBuilder(); newCrustacean.Append("fiddler crab"); Console.WriteLine(newCrustacean); newCrustacean.Remove(0,8); Console.WriteLine(newCrustacean); I defined stringbuilder like this. If I say delete (0,8), c needs to be deleted as well, why not just The word fiddler and the space are deleted.
5 Replies
ACiDCA7
ACiDCA72mo ago
because c is the 9th character? if i didnt miscount
Avnitro
AvnitroOP2mo ago
0-f 1-i 2-d 3-d 4-l 5-e 6-r 7- space 8-c is that wrong?
ACiDCA7
ACiDCA72mo ago
Remove(0,8); removes from 0, 8 characters since you start counting at 0,7(space) is the 8th character
Avnitro
AvnitroOP2mo ago
Thank you !close
Accord
Accord2mo ago
Closed!
Want results from more Discord servers?
Add your server