From 31159998c5a5997d4de179d069ad6e2578239282 Mon Sep 17 00:00:00 2001 From: bala <13452927+rfgsdhshgfh@user.noreply.gitee.com> Date: Sat, 13 Jan 2024 14:59:23 +0000 Subject: [PATCH] =?UTF-8?q?=E5=AE=9E=E7=8E=B0=E9=A1=BA=E5=BA=8F=E4=B8=B2?= =?UTF-8?q?=E7=9A=84=E5=90=84=E7=A7=8D=E6=A8=A1=E5=BC=8F=E5=8C=B9=E9=85=8D?= =?UTF-8?q?=E7=AE=97=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: bala <13452927+rfgsdhshgfh@user.noreply.gitee.com> --- ...214\271\351\205\215\347\256\227\346\263\225.cpp" | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 "2224020152/\347\254\254\345\233\233\345\215\225\345\205\203/\345\256\236\347\216\260\351\241\272\345\272\217\344\270\262\347\232\204\345\220\204\347\247\215\346\250\241\345\274\217\345\214\271\351\205\215\347\256\227\346\263\225.cpp" diff --git "a/2224020152/\347\254\254\345\233\233\345\215\225\345\205\203/\345\256\236\347\216\260\351\241\272\345\272\217\344\270\262\347\232\204\345\220\204\347\247\215\346\250\241\345\274\217\345\214\271\351\205\215\347\256\227\346\263\225.cpp" "b/2224020152/\347\254\254\345\233\233\345\215\225\345\205\203/\345\256\236\347\216\260\351\241\272\345\272\217\344\270\262\347\232\204\345\220\204\347\247\215\346\250\241\345\274\217\345\214\271\351\205\215\347\256\227\346\263\225.cpp" new file mode 100644 index 00000000..12c66382 --- /dev/null +++ "b/2224020152/\347\254\254\345\233\233\345\215\225\345\205\203/\345\256\236\347\216\260\351\241\272\345\272\217\344\270\262\347\232\204\345\220\204\347\247\215\346\250\241\345\274\217\345\214\271\351\205\215\347\256\227\346\263\225.cpp" @@ -0,0 +1,13 @@ +int SubStr(Str S, Str T) +{ + int i, j; + for (i = 0; i < S.length; i++) { + for (j = 0; j < T.length; j++) { + if (S.data[i + j] != T.data[j]) + break; + } + if (j >= T.length) + return (i+1); + } + return -1; +} -- Gitee