Search:

Type: Posts; User: mgutierrez19

Search: Search took 0.08 seconds.

  1. Replies
    13
    Views
    5,140

    Substring

    - Checks if the first string is a substring of the second one.
    - Returns 0 if it is not a substring / 1 if it is / -1 if it is a “circular substring” (see example).

    Example:
    - abcde is a...
  2. Replies
    13
    Views
    5,140

    Re: First string is a substring of another

    Thank you guys very much for all you help
  3. Replies
    13
    Views
    5,140

    Re: First string is a substring of another

    I know I was noticing that about the return statements also

    what would be your suggestions to make sure that the program completely checks that str2 is a substring of str1
  4. Replies
    13
    Views
    5,140

    Re: First string is a substring of another

    public static int substring(String Str1, String Str2)
    {
    int return = 0
    for(int i = 0; i < Str2.length(); i++)
    {
    if (Str2.charAt(i) == Str1.charAt(0))
    for(int j =0; j <...
  5. Replies
    13
    Views
    5,140

    First string is a substring of another

    I need to write a User Defined Method which
    Checks if the first string is a substring of the second one.
    - Returns 0 if it is not a substring / 1 if it is / -1 if it is a “circular substring” ...
Results 1 to 5 of 5