substring


java stuff. when you want to derivate a string from a string you already have, lets say you want to get “burger” out of “hamburger” you apply. stringname.substring(3), this is the same as having “burger” since it will take “hamburger” and from the position in 3 (programming uses 0 as the first position), it will display the rest of the string.

if you want from certain position to another, lets say “mistaken” and you just want “stake”, you will need to apply: stringname.substring(2,6), this will give you “stake”.
public int resultado(string buscado, string origen) {

int cont = 0;

int lng=buscado.length();

for(int i=0;i<=(origen.length()-lng);i++){ if ( buscado.equals (origen.substring(i,(i+lng) ) ) ) cont++; } /-- aqui debes de codificar para contar cuantas veces buscado esta en origen -/ return cont; }

Read Also:

  • suckl

    ‘suckl’ basically means the same as ‘suck’ when used in the context of “you suckl”. the difference is that it is more of an insult and generally means immature and sucky. you suckl heh suckl! yes, suckl ace

  • sumiya

    a perfect girl. who seems shy at first, when you get to know her, she is all kinds of crazy. everyone loves her, especially the boys. she will try to hide her feelings and make other people happy. she will get marinade to one of her first crush. does anyone know sumiya?

  • Tanyo

    tanyo is an european name, which is not very popular but rather interesting and having its own definition. not many individuals are blessed to be called tanyo. tanyos are mostly social, self-confident and playful individuals. they tend to be more simpleminded and lighthearted, more interested in having a good time than hard work or precision. […]

  • taptaptap that ass

    mainly used when someone is good looking or you have extremely intense alcoholic goggles on and think this is the case and you would like to hit that, hook up with them, have them take advantage of you yo i wanna taptaptap that -ss

  • Rank 1

    a dutch trance group formed in 1997. it has two members, benno de goeij and piet bervoets. their biggest hit is airwave. two trance energy anthems have been by rank 1, 2005’s was ‘beats@rank-1 dotcom’ and 2009’s ‘l.e.d. their be light.’ person #1: rank 1 is awesome! person #2: yea right, you call that supersaw […]


Disclaimer: substring definition / meaning should not be considered complete, up to date, and is not intended to be used in place of a visit, consultation, or advice of a legal, medical, or any other professional. All content on this website is for informational purposes only.