If the contents of the cells in Google sheet are as per the below image:
Then in Apps Script, how can we check whether it includes Gujarati letters or not.
function containsGujaratFont() {
var ss = SpreadsheetApp.getActiveSpreadsheet();
var sheet = ss.getSheetByName("SheetNameToWriteHere");
var vals = sheet.getRange("B1:B3").getValues();
vals.forEach(r => {
Logger.log(includesGujaratiFont(r[0]));
});
}
function includesGujaratiFont(str){
// some coding to identify if str contains Gujarati characters or not
if(itContainsGujaratiFont){
return true;
}else{
return false;
}
}
The log should be:
true
false
true
