Ben Chuanlong Du's Blog

And let it direct your passion with reason.

Work with Long Strings in Python

This article discusses different ways to write long strings in Python.

Long String in One Line

A long string can be put on the the same line, which is ugly of course.

String in Different Programming Languages

A string is essentially a sequence of characters. This is how string is implemented in many programming languages (string in Java is different). For this reason, you can operate string like an array in some programming languages. This post is a shallow summary on strings in different programming languages. For …

String in C++11

  1. auto s = "abcd" creats const char * not string, so use auto with caution.

  2. Since a string in C++ is an array of chars, you can operate it like an array. For example, you can use range-based for loop and so on.

  3. It is recommended that you use std::string in …