O'Reilly logo

Groovy Programming by John Savage, Kenneth Barclay

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

CHAPTER 3 STRINGS AND REGULAR EXPRESSIONS

The previous chapter was concerned with numeric values and the basic arithmetic operations associated with them. In this chapter, we consider Strings—an ordered sequence of characters used to represent textual information. This information might represent the name for an individual or file. Equally, it may represent a bank account number or the name of a programming language. We give further details on using Strings and regular expressions for Appendix D.

3.1 STRING LITERALS

A String literal is readily constructed by enclosing the string text in quotations. Groovy offers a variety of ways to denote a String literal. For example, Strings in Groovy can be enclosed in single quotes ('), double quotes ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required