Submitted Questions

  • Find subString in String

    Hi All, I have written the below program to find the substring in the string. in case one word coming multiple time how to handle this situation ? the below program retuning -1 as position which is wrong. {geshibot language="c"}Input ("abhijit" , "jit") public int FindSubString(string strSuper, string strSub) { char[] charSuper = strSuper.ToCharArray(); char[] charSub...

    Annon

    • Jun 15th, 2016

    This answer is wrong. Ex:

    substr("abcabcabcd", "abcabcd")

    => false (should return true)

    Danthe74

    • Dec 14th, 2014

    My solution require only one while loop. Function returns the position of find chars."c# public static int FindSubString(string strSuper, string strSub) { ...