This language bar is your friend. Select your favorite languages!

Idiom #157 Declare constant string

Initialize a constant planet with string value "Earth".

const PLANET: &'static str = "Earth";
immutable string planet = "Earth";
static immutable string planet = "Earth";
enum planet = "Earth";
enum string planet = "Earth";
const string planet = "Earth";
const planet = "Earth"
planet = "Earth"
static final String planet = "Earth";
const
  planet = 'Earth';
PLANET = 'Earth'
Planet = 'Earth'

Do you know the best way to do this in your language ?
New implementation...

Idiom created by

programming-idioms.org