Skip to content

Instantly share code, notes, and snippets.

View TyeolRik's full-sized avatar

TyeolRik TyeolRik

View GitHub Profile
@hyamamoto
hyamamoto / LENB.js
Last active October 13, 2021 08:46
Google Doc & Spreadsheets's LENB() function which is present in Microsoft Excel. LENB() returns a number of bytes, while LENH() returns a width of the given text. These functions are useful when you check if your translation resources can be fit inside original screens.
// To add these functions to your Google Doc documents,
// see https://developers.google.com/apps-script/guides/sheets/functions
/**
* @fileOverview Google Doc Apps Script: LENB() / LENH() functions for Spreadsheet.
* @author Hiroshi Yamamoto ([email protected])
* @license <a href="http://www.wtfpl.net/">WTFPL version 2.0</a>
* @version 0.2.0
*/