What do you want to save?
Add Code snippet
New code examples
-
C++ 2022-03-27 17:10:08
repeat character n times c++
auto five_repeated_dots = std::string(5, '.'); Add solution -
C# 2022-03-27 16:05:25
Find Number of Repetitions of Substring
using System; using System.Linq; public class Program { public static int NumberOfRepeats(string str) { int length = str.Length; int checkLength = 2; while (checkLength < length) { if (length % checkLength == 0) { var times ... Add solution -
Javascript 2022-03-27 11:30:14
how to check consecutive characters in javascript
var password = '5236aaa121'; for(var i = 0; i< password.length; i++) { var numberOfRepeats = CheckForRepeat(i, password, password.charAt(i)); //do something } function CheckForRepeat(startIndex, originalString, charToCheck) { var repeatC... Add solution -
Javascript 2022-03-27 07:35:02
compress string javascript
function en(c){var x='charCodeAt',b,e={},f=c.split(""),d=[],a=f[0],g=256;for(b=1;b<f.length;b++)c=f[b],null!=e[a+c]?a+=c:(d.push(1<a.length?e[a]:a[x](0)),e[a+c]=g,g++,a=c);d.push(1<a.length?e[a]:a[x](0));for(b=0;b<d.length;b++)d[b]=S... Add solution
Best helpers
Ranking is empty