Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

you have the following c# code. sb is a a very long string. you need to identify whether a string stored in an object named stringtofind is within the stringbuilder sb object. which code should you use?

stringtofind = "this is a string to find";
if (sb.indexof(stringtofind) > -1)
{
    //string found
}
else
{
    //string not found
}
 
PREVIOUS NEXT
Tagged: #sb #long #identify #string #stored #object #named #stringtofind #stringbuilder #sb #code
ADD COMMENT
Topic
Name
7+7 =