FAQ
 
 
Cover  \ Exhibition  \ Learning  \ Reference  \ Download  \ Discourse   
      Linguagem \ Ambiente \ Bibliotecas \ Comparação
 
   
   
Back  
   
  Referência para Processing (BETA) version 91+. Se você tem uma versão anterior, utilize a documentação inclusa em seu software. Se você encontrar quaisquer erros ou tiver quaisquer comentários, leve ao nosso conhecimento.  
Class   String
   
Nome  

substring()

   
Exemplos  
String str1 = "CCCP"; 
String str2 = "Rabbit"; 
String ss1 = str1.substring(2);     // Returns "CP" 
String ss2 = str2.substring(3);     // Returns "bit" 
String ss3 = str1.substring(0, 2);  // Returns "CC" 
println(ss1 + ":" + ss2 + ":" + ss3);  // Prints 'CP:bit:CC' 

Descrição   Returns a new string that is a part of the original string. When using the endIndex parameter, the string between beginIndex and endIndex-1 is returned.
   
Sintaxe  
substring(beginIndex)
substring(beginIndex, endIndex)
   
Parâmetros  
beginIndex   int: position from which to begin (inclusive)

endIndex   int: position from which to end (exclusive)

   
Retorno   String
   
Utilização   Web & Applicações
   
 
 






   
 
Original em inglês atualizado em: Fri Jul 15 16:36:11 PDT 2005
Tradução para o Português do Brasil: Luiz Ernesto Merkle
Atuallizada em: 30 de novembro de 2005, 9h00 (BRST)
 
 








Creative Commons License
 
  Processing é um projeto aberto iniciado por Ben Fry e Casey Reas  
  © Info