I share this blog with my thoughts and creations from my daily programming, knowledge, and technology updates.
function replace_first_letter(){ var str = "abc"; var result = str.replace(/^./, "x"); Logger.log(result); }
この機能がやること 文字列 先頭の1文字をxに変えて 結果をログに出す
A列の空白セルに直前の値を入れたくて書いたコードです スプレッドシートに以下のようなBeforeの表があるとき (A列に空白セルがある) Before 1 A B 2 エリア 都市 3 東京 新宿 4 渋谷 5 池袋 6 神奈川 横浜 7 川崎 8 相模原 9 千葉 千葉 10 ...