<commit_before>// Learning about strings in javascript
console.log('I am a String');
console.log('This numeber is a string 12345');
console.log("This returns the length of HelloWorld ('HelloWorld.length'):",'HelloWorld'.length);
console.log("Helloworld".charAt(5));
console.log('I am <NAME>'.replace('Jessi','Walter'));
console.log('helloworld'.toUpperCase());
console.log('HELLOWORLD'.toLowerCase());
console.log('HELLO WORLD'.replace('WORLD','WALTER').toLowerCase());
console.log('HELLO WORLD'.replace('WORLD','WALTER').toUpperCase());
console.log('HELLO WORLD'.charAt(6).toLowerCase());
console.log('<NAME>'.charAt(8).toUpperCase());

var a = 'Me too are a string';
console.log(a);<commit_msg>Methods of the strings<commit_after>// Learning about strings in javascript
console.log('I am a String');
console.log('This numeber is a string 12345');
console.log("This returns the length of HelloWorld ('HelloWorld.length'):",'HelloWorld'.length);
console.log("Helloworld".charAt(5));
console.log('I am <NAME>'.replace('Jessi','Walter'));
console.log('helloworld'.toUpperCase());
console.log('HELLOWORLD'.toLowerCase());
console.log('HELLO WORLD'.replace('WORLD','WALTER').toLowerCase());
console.log('HELLO WORLD'.replace('WORLD','WALTER').toUpperCase());
console.log('HELLO WORLD'.charAt(6).toLowerCase());
console.log('<NAME>'.charAt(8).toUpperCase());

// Methods of the strings
var a = 'Me too are a string'; // return a string : Me too are a string
console.log(a);

var a = "I am a string";
console.log(a.indexOf('am')); // return 2

var a = "I am a string";
console.log(a.search('am')); // return 2

var a = "I am a string";
console.log(a.slice(0,10)); // extracting string parts
var a = "I am a string";
console.log(a.slice(-9,-1));
var a = "I am a string";
console.log(a.slice(9));
var a = "I am a string";
console.log(a.slice(-6));
{'fraction_non_alphanumeric': 0.20337139749864055, 'fraction_numerical': 0.013594344752582926, 'mean_word_length': 6.330677290836653, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2619694', 'n_tokens_mistral': 638, 'n_tokens_neox': 618, 'n_words': 151}