About 3,740 results
Open links in new tab
  1. String variables are essential in programming and web development as they store and manipulate textual data. A string is a sequence of characters enclosed in quotation marks, which can include letters, numbers, symbols, and whitespace. String variables allow developers to handle user input, process text, and interact with databases.

    Declaring and Initializing String Variables

    To use a string variable, you need to declare it and assign it a value. In most programming languages, this involves specifying the data type (string) and providing a name for the variable. For example, in Python:

    my_name = "John Doe"
    Copied!

    In this example, the string variable my_name is assigned the value "John Doe".

    Manipulating String Variables

    String variables can be manipulated in various ways to suit different needs:

    Concatenation

    Concatenation combines two or more strings into a single string using the concatenation operator (+):

    greeting = "Hello"
    name = "John"
    message = greeting + ", " + name + "!"
    Copied!
    Feedback
  2. String (computer science) - Wikipedia

    In computer programming, a string is traditionally a sequence of characters, either as a literal constant or as some kind of variable. The latter may allow its elements to be mutated and the length changed, or it may be fixed (after creation). A string is often implemented as an array data structure of bytes (or words) that stores a sequence of elements, typically characters, using some character encoding. More general, string …

  3. Variable in Programming - GeeksforGeeks

    Jul 23, 2025 · Variable in Programming is a named storage location that holds a value or data. These values can change during the execution of a program, hence …

  4. String Basics - Visual Basic | Microsoft Learn

    • The String data type represents a series of characters (each representing in turn an instance of the Char data type). This topic introduces the basic concepts of strings in Visual Basic.
    See more on learn.microsoft.com

    Code sample

    Dim TwoString As String
    OneString = "one, two, three, four, five"
    TwoString = OneString.Substring(5, 3)
    OneString = "1"
    TwoString = OneString & "1"...
  5. Strings, Types, and Variables - University of Washington

    To store a piece of data into a variable, we use this syntax: For example, if we wanted to store the string "Quackers" into a variable named pet, we would write it like this: This line declares a variable named …

  6. What is a Variable? - W3Schools

    Variables are one of the most basic and essential concepts in programming, used to store values. What is a Variable? A variable has a name, and you can store something in it. The image below shows how …

  7. People also ask
  8. Computer Programming - Strings - Online Tutorials Library

    Most of the programming languages provide built-in functions to manipulate strings, i.e., you can concatenate strings, you can search from a string, you can extract sub-strings from a string, etc. For …

  9. Python String Variables: A Comprehensive Guide - CodeRivers

    Apr 17, 2025 · In Python, strings are a fundamental and versatile data type. They are used to represent text, and understanding how to work with string variables is essential for a wide range of …

  10. String Variables Explained: The Beginner's Crash Course [2024]

    Have you ever wondered what is a string variable and how it works in programming? This guide simplifies the concept. A string variable is fundamental. It stores text data. Think of it as a container. …

  11. Strings – Programming Fundamentals

    A string is traditionally a sequence of characters, either as a literal constant or as some kind of variable. The latter may allow its elements to be mutated and the length changed, or it may be fixed (after …