String
A string is a programming-language value representing an ordered sequence of characters or character units as text.
Get Programming: Learn to code with Python
- How it is used
- Uses strings to store and reshape text, including user input and parts of names.
- How deep it goes
- Works through literals, indices, slices, methods, concatenation, and repetition, while deferring deeper object-oriented programming.
- Examples
- Uses quoted digits, indexed characters, essay character counts, repeated hangman dashes, and a name-mashup program.
- What you can do after
- Apply it via Python string operations to inspect, change, and combine text for an interactive name mashup.
Read how Get Programming: Learn to code with Python explains string →
Learn AI-Assisted Python Programming, Second Edition
A string is a sequence of characters represented as a text value in a programming language.
- How it is used
- Stores, combines, searches, cleans, indexes, and validates text within practical Python functions.
- How deep it goes
- Explains quotation syntax, methods, concatenation, indexing, and testing, without descending into string implementation internals.
- Examples
- Uses password validation, phone-number cleaning, sentence construction, secret codes, longest-word tests, and empty strings.
- What you can do after
- Apply it via Python to store, inspect, combine, clean, index, validate, and test text values.
Read how Learn AI-Assisted Python Programming, Second Edition explains string →
Python Workout: 50 ten-minute exercises
A string is a Python sequence type representing text as an ordered collection of Unicode characters.
- How it is used
- Uses strings to read, display, search, transform, and format text throughout Python programs.
- How deep it goes
- Explains sequence behavior, membership, slicing, immutability, conversion, and formatting through runnable exercises, without descending into implementation internals.
- Examples
- Demonstrates enumeration, user input, Pig Latin translation, vowel membership, slices, immutability, and f-string formatting.
- What you can do after
- Apply string sequences to search, iterate, slice, convert, format, and transform text in Python programs.
Read how Python Workout: 50 ten-minute exercises explains string →
Tiny Python Projects: Learn coding and testing with puzzles and games
A string is a Python value representing a sequence of text characters.
- How it is used
- Uses strings to process command-line text, construct output, transform characters, represent state, and encode words numerically.
- How deep it goes
- Explains types, indexing, methods, immutability, formatting, membership, and testing through runnable examples, stopping short of formal string internals.
- Examples
- Demonstrates greeting generation, vowel detection, find-and-replace, character mutation, word scrambling, holiday verses, and numeric word encoding.
- What you can do after
- Build it from scratch by writing, testing, transforming, formatting, and validating Python string-processing programs.
Read how Tiny Python Projects: Learn coding and testing with puzzles and games explains string →
Python Workout, Second Edition
A string is an immutable sequence of characters in Python, including text assembled with formatting.
- How it is used
- Uses strings for text manipulation, including iteration, searching, slicing, splitting, sorting, and reconstruction.
- How deep it goes
- Explains string immutability, Unicode, sequence operations, bounds, performance, and idiomatic transformations through exercises and implementation strategies.
- Examples
- Uses vowel detection, Pig Latin and Ubbi Dubbi translators, sentence splitting, character sorting, indexing, slicing, and file-oriented word challenges.
- What you can do after
- Apply strings via built-in operations and methods to build readable text-processing programs and avoid inefficient concatenation.
Refactoring to Rust
A string type is a type whose values represent text and whose representation determines how text storage and allocation are managed.
- How it is used
- Uses string types to choose between owned, growable text and read-only views while controlling allocations.
- How deep it goes
- Explains representations, mutability, capacity, and conversions through code; defers fuller treatment of lifetimes.
- Examples
- Compares repeated Python concatenation with Rust pushes, preallocates a large buffer, and passes an artwork name as a reference.
- What you can do after
- Apply it via Rust’s standard library: choose `String` or `&str`, reserve capacity, and convert between them.
100 Go Mistakes and How to Avoid Them
A string is a Go value representing an immutable sequence of arbitrary bytes, conventionally containing UTF-8 text.
- How it is used
- Diagnoses mistakes in string iteration, concatenation, byte-slice conversions, and retained substrings.
- How deep it goes
- Explains byte representation, rune offsets, allocation costs, and substring storage; qualifies storage sharing as compiler-dependent.
- Examples
- Contrasts incorrect and corrected iteration over `hêllo`, then extracts a short identifier from a large log message.
- What you can do after
- Apply it via `strings.Builder`, `bytes.TrimSpace`, and `strings.Clone` to avoid repeated copying, needless conversions, and retained buffers.
Read how 100 Go Mistakes and How to Avoid Them explains string →
Learn Rust in a Month of Lunches
- How it is used
- Distinguishes borrowed text from owned, changeable text when choosing how to store and use strings.
- How deep it goes
- Explains slices, ownership, UTF-8 byte lengths, and common mutation methods, with examples of compiler feedback and allocation.
- Examples
- Compares English and Korean byte counts, corrects a bare-str declaration, and filters characters with `.retain()`.
- What you can do after
- Apply Rust’s `&str` and `String` to choose borrowed or owned text, check byte length, and change owned strings.
Statistics Slam Dunk
A character string is a sequence of text characters represented as a character value in R.
- How it is used
- Prepares text columns for readable plots, categorical summaries, filtering, date handling, and numerical analysis.
- How deep it goes
- Defines character strings and demonstrates inspection, substring extraction, and conversion to factors, dates, and numbers.
- Examples
- Uses NBA season labels, franchise names, play types, player names, dates, and formatted points-per-game values.
- What you can do after
- Apply via base R, dplyr, and stringr to inspect, extract, filter, and convert character data.
Pandas Workout: 200 exercises to make you a stronger data analyst
An immutable Python sequence of Unicode characters.
- How it is used
- Processes textual data in pandas Series through elementwise string methods and custom functions.
- How deep it goes
- Demonstrates chained transformations, regular-expression filtering, missing-value handling, and custom functions rather than string internals.
- Examples
- Uses word-frequency analysis, punctuation stripping, digit detection, regular-expression filtering, digit extraction, and vowel counting.
- What you can do after
- Apply it via pandas string methods to clean, inspect, filter, transform, and summarize textual Series.
Read how Pandas Workout: 200 exercises to make you a stronger data analyst explains string →
Learn PowerShell in a Month of Lunches: Fourth Edition, Covers Windows, Linux, and macOS
A string, represented by the .NET System.String type, is a sequence of characters representing text data.
- How it is used
- Uses strings to pass text, paths, resource-group names, and delimited data through PowerShell commands and automation.
- How deep it goes
- Explains quoting, arrays, object types, conversion, joining, splitting, and common methods through runnable command examples.
- Examples
- Demonstrates quoted paths, resource-group names, trimmed usernames, pipe-delimited arrays, tab-delimited files, and typed numeric input.
- What you can do after
- Apply it via PowerShell operators and System.String methods to clean, inspect, split, join, store, and safely pass text values.
The Quick Python Book, Fourth Edition
A string is an immutable sequence of characters represented as a Python value.
- How it is used
- Handles text such as user input, filenames, and file contents through Python’s built-in text operations.
- How deep it goes
- Explains literal syntax, sequence operations, immutability, methods, formatting, and bytes conversion, while referring readers to documentation for the full method list.
- Examples
- Demonstrates quote choices, character indexing, newline removal, string methods, list-and-join editing, and Unicode encoding.
- What you can do after
- Practice/perform common text tasks by extracting substrings, transforming text into new strings, formatting output, and distinguishing strings from bytes.
Read how The Quick Python Book, Fourth Edition explains string →
Learn Haskell by Example
A string is an ordered sequence of characters represented as a value in a programming language.
- How it is used
- Represents cipher messages and alphabets as character sequences for classification, rotation, and transformation.
- How deep it goes
- Defines String as [Char], demonstrates literals and list operations, then implements recursive character-by-character transformation.
- Examples
- Uses "Hello World", Latin alphabet ranges, concatenation, and a ROT13 Caesar cipher.
- What you can do after
- Build a Caesar cipher that creates a transformed String from each input character.
A Pythonic Adventure: From Python basics to a working web app
A string is a sequence of text characters represented as a value in a program.
- How it is used
- Uses strings to display messages, collect coffee-shop answers, and pass text into functions.
- How deep it goes
- Defines strings through prompts and output, then stops short of detailed string operations.
- Examples
- Demonstrates coffee-shop prompts, names, drinks, flavors, toppings, welcome messages, and order summaries.
- What you can do after
- Apply strings via Python to prompt users, store responses, and print personalized messages.
Read how A Pythonic Adventure: From Python basics to a working web app explains string →
Rust in Action: Systems programming concepts and techniques
String is Rust's owned, growable UTF-8 string type whose character data is stored in heap-allocated memory.
- How it is used
- Uses String to introduce growable text and to expose the distinction between owned text and string slices.
- How deep it goes
- Explains growth, common operations, and heap allocation, then shows a generic read-only parameter without detailing String’s internal layout.
- Examples
- Uses multilingual greetings, a line-by-line text search, and a password-length function that accepts different text types.
- What you can do after
- Apply it via Rust’s String and AsRef<str> to handle growable text and write read-only functions accepting String or &str.
Read how Rust in Action: Systems programming concepts and techniques explains string →
Learn Go with Pocket-Sized Projects
A string is a Go value type representing a sequence of bytes, conventionally used for textual data.
- How it is used
- Uses strings to represent messages, language inputs, formatted values, and assembled game feedback.
- How deep it goes
- Explains string returns, parameters, named string types, Stringer, and concatenation, but does not descend into byte-level operations.
- Examples
- Demonstrates greetings, language codes, emoji-based hints, feedback slices, naive concatenation, and strings.Builder.
- What you can do after
- Build and refactor functions that return strings, pass named string values, implement Stringer, and assemble formatted output.
Read how Learn Go with Pocket-Sized Projects explains string →
Code Like a Pro in Rust
- How it is used
- Guides the choice between owned, mutable text and borrowed, immutable text in Rust APIs.
- How deep it goes
- Explains allocation, borrowing, static lifetimes, and Vec<u8> backing, without developing UTF-8 encoding internals.
- Examples
- Contrasts functions accepting String and &str, then shows the Vec<u8> field inside String.
- What you can do after
- Apply it via Rust’s standard library to select String, &str, or &'static str for storage and parameters.
Learn SQL in a Month of Lunches
A string is a sequence of characters treated as text data.
- How it is used
- Filters text columns, searches string patterns, stores text in variables, and combines text values in SQL tasks.
- How deep it goes
- Explains quoting, exact matching, hidden characters, ranges, wildcards, variables, concatenation, and database-specific behavior.
- Examples
- Uses title-name and author-name filters, payment-method conditions, a MySQL title variable, and attempted arithmetic-style concatenation.
- What you can do after
- Apply strings in SQL filters, pattern searches, variables, and concatenation while avoiding quoting, whitespace, and portability errors.
Pro Angular 16
A string is a JavaScript primitive value representing a sequence of characters.
- How it is used
- Uses strings to represent text, combine content with data, and produce values for display.
- How deep it goes
- Explains literals, interpolation, coercion, and common methods through examples without descending into string internals.
- Examples
- Demonstrates quoted literals, London100 coercion, template interpolation, and a table of common string methods.
- What you can do after
- Apply string literals, concatenation, template interpolation, common methods, and runtime type checks in JavaScript and TypeScript.
Modern C, Third Edition
A C string is an array of char whose elements end with a terminating zero character.
- How it is used
- Defines the representation and library conventions used for text stored in C arrays.
- How deep it goes
- Explains termination, initialization, character encoding, and mem-versus-str functions, but defers the complete function catalog.
- Examples
- Uses equivalent jay declarations, unterminated fixed-size arrays, and a program-name copy using strlen, memcpy, and strcmp.
- What you can do after
- Apply C strings via <string.h> while allocating and preserving space for the terminating zero.
Go in Action, Second Edition
A string is Go's immutable sequence-of-bytes type, conventionally used to hold encoded text.
- How it is used
- Processes textual data, compares and combines values, and transforms loaded file bytes for word counting.
- How deep it goes
- Explains read-only bytes, UTF-8 encoding, comparisons, concatenation, length, and ASCII iteration, but stops short of character-level access.
- Examples
- Demonstrates strings.Fields, ASCII and Unicode length, hexadecimal byte output, byte iteration, comparison, escape sequences, and concatenation.
- What you can do after
- Apply string operations and file-text processing while interpreting lengths and iteration correctly across ASCII and Unicode.
Modern C
- How it is used
- Represents text as a zero-terminated char array and supports string-specific operations through string.h.
- How deep it goes
- Defines zero termination and initialization, then distinguishes array-oriented mem functions from string-oriented str functions.
- Examples
- Uses several initializations of "jay" to contrast terminated strings with char arrays lacking a terminating 0.
- What you can do after
- Apply strlen, memcpy, and strcmp to copy and compare a program-name string while explicitly adding its terminator.
100 Java Mistakes and How to Avoid Them
- How it is used
- Diagnoses common string-handling mistakes, especially comparisons that confuse content equality with reference identity.
- How deep it goes
- Explains string comparison through interning, compile-time constants, runtime-created objects, consequences, prevention, and analysis tooling.
- Examples
- Uses literal and concatenated strings to contrast shared constant objects with separately created runtime objects.
- What you can do after
- Diagnose/debug with IntelliJ IDEA inspections or SonarLint, and replace == with equals() for string content comparisons.
Read how 100 Java Mistakes and How to Avoid Them explains string →
Essential TypeScript 5, Third Edition
String is a built-in JavaScript function and constructor that converts values to strings and can create String objects.
- How it is used
- Clarifies how JavaScript represents text and how string values affect comparisons, interpolation, and arithmetic-like expressions.
- How deep it goes
- Defines string values and demonstrates syntax, typeof inspection, dynamic reassignment, and coercion, but does not detail String constructor internals.
- Examples
- Uses quoted names, template literals, mixed price values, typeof output, and a function receiving string, number, and boolean arguments.
- What you can do after
- Diagnose unexpected output by inspecting string values with typeof and checking whether mixed operations concatenate or coerce.
Read how Essential TypeScript 5, Third Edition explains string →
Related concepts
- input()produced by · input() is a Python built-in function that optionally displays a prompt, reads a line from standard input, and returns it as a string.
- arraykind of · An array is an indexed, ordered collection of elements arranged in one or more dimensions, with elements accessed by position.
- empty stringincludes · An empty string is a string value containing zero characters.
- token idkind of · A token ID is a numeric identifier assigned to a token in a vocabulary so it can be represented and processed numerically.
- primitive data typekind of · A primitive data type is a fundamental, language-provided type for representing a basic value, rather than a composite of multiple values.
- listequivalent to · A list is an ordered collection of elements arranged in a sequence.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.























