Skip to content

Instantly share code, notes, and snippets.

View singasonggkim's full-sized avatar

Seongji Kim singasonggkim

View GitHub Profile
@singasonggkim
singasonggkim / LENB.js
Last active August 9, 2018 17:48 — forked from hyamamoto/LENB.js
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 (higon@freepress.jp)
* @contributor Seongji Kim (singasonggkim@gmail.com)
* @license <a href="http://www.wtfpl.net/">WTFPL version 2.0</a>
* @version 0.2.0
*/