What do you want to save?
Add Code snippet
New code examples
-
C++ 2022-02-02 22:01:36
distinct char string c++
#include<stdio.h> #include<string.h> // function to return the number of unique // characters in str[] int count_unique_char(char* str) { int hash[128] = { 0 }; int i, c = 0; // reading each character of str[] for (i = 0; i < strlen(... Add solution -
PHP 2022-02-02 08:31:33
string length php online
echo strlen("First example of String"); Add solution -
Perl 2022-01-30 18:35:07
perl id number validation south africa
# NB--> Language: Perl # NB--> Country of ID: South Africa (RSA) use Scalar::Util 'looks_like_number'; sub Validate_IdNum($); sub GetLuhnDigit($); #----------------------------------------------------------------# # Validates the id number being pa... Add solution -
C 2022-01-29 10:36:54
RTOS task status
/* This example demonstrates how a human readable table of run time stats information is generated from raw data provided by uxTaskGetSystemState(). The human readable table is written to pcWriteBuffer. (see the vTaskList() API function which actually do... Add solution -
PHP 2022-01-28 21:11:10
string slice php
<?php echo substr('abcdef', 1); // bcdef echo substr('abcdef', 1, 3); // bcd echo substr('abcdef', 0, 4); // abcd echo substr('abcdef', ... Add solution -
Other 2022-01-25 20:05:51
how to count the most common letter in a string c
#include <stdio.h> #include <stdlib.h> #include <string.h> #define ENG_LETTERS 26 #define STR_LEN 100 int main() { int countArray[ENG_LETTERS] = {0}; char str[STR_LEN] = { 0 }; char engChar = 'a' - 1; int length = 0; ... Add solution -
Other 2022-01-22 12:30:03
$trim_length = $custom_field = 'field-name'
$trim_length = 100; //desired length of text to display $custom_field = 'my-custom-field-name'; $value = get_post_meta(get_the_ID(), $custom_field, true); if ($value) { $trimmed_value= rtrim(substr($value,0,$trim_length)); if (strlen($trimmed_value) &g... Add solution