| 2933 | |
| 2934 | |
| 2935 | int FindTextDelim(LPCTSTR aBuf, TCHAR aDelimiter, int aStartIndex, LPCTSTR aLiteralMap) |
| 2936 | { |
| 2937 | for (int mark = aStartIndex; ; ++mark) |
| 2938 | { |
| 2939 | if (aBuf[mark] == aDelimiter) |
| 2940 | { |
| 2941 | if (aLiteralMap && aLiteralMap[mark]) |
| 2942 | continue; |
| 2943 | return mark; |
| 2944 | } |
| 2945 | switch (aBuf[mark]) |
| 2946 | { |
| 2947 | case '\0': |
| 2948 | // Reached the end of the string without finding a delimiter. Return the |
| 2949 | // index of the null-terminator since that's typically what the caller wants. |
| 2950 | return mark; |
| 2951 | case '`': |
| 2952 | // This allows g_DerefChar or aDelimiter to be escaped, but since every other non-null |
| 2953 | // character has no meaning here, it doesn't need to check which character it is skipping. |
| 2954 | if (!aLiteralMap && aBuf[mark+1]) |
| 2955 | ++mark; |
| 2956 | continue; |
| 2957 | } |
| 2958 | } |
| 2959 | } |
| 2960 | |
| 2961 | |
| 2962 |
no outgoing calls
no test coverage detected