What do you want to save?
Add Code snippet
New code examples
-
Python 2022-02-02 21:01:16
initials of a name in python
Raw_name = input("\nEnter Full Name : ") name = Raw_name.strip() bname = name.split(' ') lenofstr = len(bname) fname = bname[0] leofstrstr = str(lenofstr) vlname = int(lenofstr) - 1 lname = bname[int(vlname)] print("\nHi,"+bname[0]) ... Add solution -
PHP 2021-10-26 14:21:12
stristr php
#Case-insensitive strstr() #stristr(string $haystack, string $needle, bool $before_needle = false): string|false #Returns all of haystack starting from and including the first occurrence of needle to the end. <?php $email = '[email protected]'; ech... Add solution -
C 2021-10-20 21:57:03
C count occurrences of a substring
#include <stdio.h> #include <string.h> int count(const char *str, const char *sub) { int sublen = strlen(sub); if (sublen == 0) return 0; int res = 0; for (str = strstr(str, sub); str; str = strstr(str + sublen, sub)) ... Add solution -
Python 2021-10-08 04:39:04
short name in python
Raw_name = input("\nEnter Full Name : ") name = Raw_name.strip() bname = name.split(' ') lenofstr = len(bname) fname = bname[0] leofstrstr = str(lenofstr) vlname = int(lenofstr) - 1 lname = bname[int(vlname)] print("\nHi,"+bname[0]) ... Add solution -
C++ 2021-10-06 21:18:05
use of strstr in c++
#include <iostream> #include <string.h> using namespace std; int main() { char str1[] = "Apples are red"; char str2[] = "are"; char *ptr; ptr = strstr(str1, str2);  ... Add solution