Strings

This page documents the results from the whiteboards where all Javapolis 2006 participants were encouraged to participate with their ideas.


Multi-line Strings

This idea was to provide a syntax for creating multi line strings.

Proposed syntax 1

String str = "
second line
third line";

Proposed syntax 2

String str = """
first line
second line
third line
""";

Comments included:

  • "***Yes!"
  • "Yes!"
  • "Great idea"
  • "Like in Groovy"
    • "And taken from Python"
    • "Yes, why not"
  • "Is text at start/end of multi-line included in the string"
    • "Yes in syntax 1, No in syntax 2"

Variable replaced strings

This idea provides a syntax to replace elements in a string.

str = "My name is $name, pleased to meet you!";

The new syntax would provide a mechanism of replacing $name with the person's name when outputting the string. The exact details were not specified.

There were no comments on this idea.


Adaptavist Theme Builder Powered by Atlassian Confluence