Member-only story

Strings

Raheelanjum
2 min readDec 5, 2024

--

The technical description of a String is: an array of characters. The informal view of a string is a sentence. Strings are almost always written in code as a quoted sequence of characters, i.e., "this is a string".

Strings

Strings are like sentences. They are formed by a list of characters, which is really an "array of characters". Strings are very useful when communicating information from the program to the user of the program. They are less useful when storing information for the computer to use.

Here are some examples of creating strings in various languages.

Concatenation ("adding" strings together)

It is possible to "add" strings together, which really means concatenation. Every programming language provides this ability in either an easier or more difficult manner. We'll start from easy to hard.

Converting other data types to strings

Depending on the language, you can more or less easily convert data into a string.

MatlabActionScriptC Language
In Matlab, you have to use the sprintf command (using a format string).

--

--

Raheelanjum
Raheelanjum

Written by Raheelanjum

Highly skilled and experienced content writer dedicated to crafting compelling, informative content that resonates with diverse audiences. Expertise spans blog

Responses (8)