/*已知字符串采用带结点的链式存储结构(详见linksrting.h文件),请编写函数linkstring substring(linkstring s,int i,int len),在字符串s中从第i个位置起取长度为len的子串,函数返回子串链表.*/ #include "linkstring.h"/*请将本函数补充完整,并进行测试*/linkstring substring(linkstring s, int i, int len){linkstring temp;int j;fo…
用最基本的遍历来实现判断字符串 a 是否被包含在字符串 b 中,并返回第一次出现的位置(找不到返回 -1) 例子: a='12';b='1234567'; // 返回 0 a='47';b='1234567'; // 返回 3 a='355';b='12354355'; // 返回 5 isContain(a,b);思路:解题“遍历,字符串“-->for in “判断包含” ==,!= function isContain(a,b){ for(let i in b){ if(a[0]==b[i]…