Subversion Repositories Kolibri OS

Rev

Rev 7941 | Rev 8278 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 7941 Rev 7945
Line 501... Line 501...
501
		count++;
501
		count++;
502
	}
502
	}
503
	return count;
503
	return count;
504
}
504
}
Line -... Line 505...
-
 
505
 
-
 
506
inline int strinum(dword haystack, needle)
-
 
507
{
-
 
508
	int count = 0;
-
 
509
	int needle_len = strlen(needle);
-
 
510
	loop() {
-
 
511
		if (! haystack = strstri(haystack, needle)) break;
-
 
512
		haystack+=needle_len;
-
 
513
		count++;
-
 
514
	}
-
 
515
	return count;
-
 
516
}
505
 
517
 
506
inline signed int strcmpi(dword cmp1, cmp2)
518
inline signed int strcmpi(dword cmp1, cmp2)
507
{
519
{
Line 508... Line 520...
508
    char si, ue;
520
    char si, ue;
Line 535... Line 547...
535
        if (ue>='A') && (ue<='Z') ue +=32;
547
        if (ue>='A') && (ue<='Z') ue +=32;
536
        if (si == ue) usestr_e++; else usestr_e = usestr_s;
548
        if (si == ue) usestr_e++; else usestr_e = usestr_s;
537
        searchin++;
549
        searchin++;
538
        if (DSBYTE[usestr_e]=='\0') return searchin;
550
        if (DSBYTE[usestr_e]=='\0') return searchin;
539
    }
551
    }
540
    return -1;
552
    return 0;
541
}
553
}
Line 542... Line 554...
542
 
554
 
543
 
555
 
544
inline unsigned int strcpyb(dword search_in, copyin, startstr, endstr)
556
inline unsigned int strcpyb(dword search_in, copyin, startstr, endstr)
545
{
557
{
546
    dword startp, endp;
558
    dword startp, endp;
547
    dword copyin_start_off = copyin;
-
 
548
    if (startstr==0) startp = search_in; else startp = strstr(search_in, startstr) + strlen(startstr);
559
    dword copyin_start_off = copyin;
549
    endp = strstri(startp, endstr);
560
    if (startstr==0) startp = search_in; else startp = strstr(search_in, startstr) + strlen(startstr);
550
    if (endp==0) endp = startp+strlen(search_in);
561
    if (! endp = strstri(startp, endstr)) endp = startp+strlen(search_in);
551
    //if (startp==endp) return 0;
562
    //if (startp==endp) return 0;
552
    do
563
    do
553
    { 
564
    {