function convert_part_to_lowercase(str: string, start: number, end: number) {
// Extract the part of the string before the start index
const before: string = str.substring(0, start);
const upperPart: string = str.substring(start, end).toLowerCase();
// Extract the part of the string after the end index
const after: string = str.substring(end);
return before + upperPart + after;
}
let s = "TYPESCRIPT PROGRAMMING";
s = convert_part_to_lowercase(s, 3, 6);
console.log(s);
s = convert_part_to_lowercase(s, 13, 14);
console.log(s);
/*
run:
"TYPescRIPT PROGRAMMING"
"TYPescRIPT PRoGRAMMING"
*/