Perl obter os primeiros caracteres

Exemplos de código

1
0

perl obter os primeiros caracteres

# For Perl (language) only

# syntax
substr(<your-string>,0,<characters-to-extract>)

# example 
substr("Cool, isn't it!",0,4)

# application
my $sRandom = "Cool, isn't it!";
my $s1stFewChars = substr($sRandom,0,4);
print "[ sRandom : '$sRandom' ] \n[ s1stFewChars : '$s1stFewChars' ]" . "\n";

Páginas relacionadas

Páginas semelhantes com exemplos

Em outros idiomas

Esta página está em outros idiomas

Русский
..................................................................................................................
English
..................................................................................................................
Italiano
..................................................................................................................
Polski
..................................................................................................................
Română
..................................................................................................................
한국어
..................................................................................................................
हिन्दी
..................................................................................................................
Français
..................................................................................................................
Türk
..................................................................................................................
Česk
..................................................................................................................
ไทย
..................................................................................................................
中文
..................................................................................................................
Español
..................................................................................................................
Slovenský
..................................................................................................................
Балгарскі
..................................................................................................................
Íslensk
..................................................................................................................