Welcome to Software Development on Codidact!
Will you help us build our independent community of developers helping developers? We're small and trying to grow. We welcome questions about all aspects of software development, from design to code to QA and more. Got questions? Got answers? Got code you'd like someone to review? Please join us.
Comments on How to get string length in D?
Post
+1
−0
Strings in D have .length
property which is used to calculate the number of characters in a string.
Note: Spaces are calculated.
Here is an example:
import std.stdio;
void main() {
string s = "Hello, World!";
write(s.length);
}
Learn more about D in Documentation.
1 comment thread