How can I find the wheather the occurance substring is main string in
wide char provided that the compasion should be case insensitive.
Assumption: Your question is "How can I find out whether a wide char
substring occurs in some wide char string under the condition that
the comparison should be case insensitive?"
Answer: "You cannot reliably."
Even if you use towupper() from <wctype.h> on every wide character
of both strings (such that they are now "upper case" strings) then
you can still have the situation that for
wint_t a, b, c, d;
there holds
(towlower(a) == towlower(b)) && (towlower(b) == c)
but
(a!=b) && (a!=c) && (b!=c)
and
d == towupper(c)
where it is open whether d compares equal to a, b or none of them.
However, if there is a one-on-one mapping of upper and lower case
letters, you can use towupper() as described above in combination
with some string search algorithm.
Cheers
Michael