I am writing a scientific text in the area of computer science. Often, I need to refer to a certain data structure named String which refers to a sequence of characters. In most programming languages, this needs to be capitalized in order to be correct. However, when I refer to that data structure in regular text, do I have to capitalize it?

I tried to do it like others do it but I have seen both.

Sample Sentences

  1. A matcher might use a string-based matching strategy.
  2. The string "hello world"...
  3. On a general level, syntax refers to a set of rules that define how to structure characters and strings.
  4. Each retrieved string from one ontology is compared to each retrieved string from the other ontology.
  5. These kind of strings slow down the comparison process.
  • How do you refer to it. Do you say "soandso of type String", or do you just say "string soandso". That makes all the difference. Please provide a handful of example sentences. Thank you.
    – RegDwigнt
    Commented Aug 9, 2018 at 8:52
  • @RegDwigнt♦ I have added some sample sentences to the question.
    – Janothan
    Commented Aug 9, 2018 at 8:59

2 Answers 2


The proper noun String and the common noun string sound the same, but they are different things. The former refers to a particular data structure, on which you might be able to make function calls to get various attributes. The latter is merely a sequence of characters, with no programming support.

Your sample sentence #3 makes sense only with the common noun. All the other sample sentences would be understood differently depending on whether you use the common noun or the proper noun, though both variants are grammatical.

To answer your question: use the capitalised version for the proper noun and the sentence-case version for the common noun.


Use 'String' for explicitly pointing out the data type. For example, you may write "a variable of String data type" or you can write "a string variable".

  • Yes, if you are writing generally it's a string variable. Depending on the development environment the string data type might be String, STR, text, Text, txt or any one of a number of other things, it might even be chuàn in a chinese environment. However they would all be string variables breaking up the binary input into bytes and treating each byte as an ASCII or Unicode character.
    – BoldBen
    Commented Aug 9, 2018 at 10:30
  • "A variable of String data type" is not grammatical in English.
    – tchrist
    Commented Aug 9, 2018 at 15:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.