~dricottone/ado-personal

9c2e7acaeba0ce0eb93bdfc0d3f97a9c35a35059 — dricottone 3 years ago 0e06816
Formatting
1 files changed, 1 insertions(+), 2 deletions(-)

M count_nonascii.ado
M count_nonascii.ado => count_nonascii.ado +1 -2
@@ 1,3 1,4 @@
// Dominic R, 7/22/2021

program count_nonascii
	syntax [varlist(string default=none)]


@@ 9,7 10,6 @@ program count_nonascii

	local affected 0
	local total 0

	foreach v of varlist `varlist' {
		quietly count if ustrregexm(`v',"[^ -~]")
		local affected = `affected' + r(N)


@@ 20,6 20,5 @@ program count_nonascii

		quietly drop _nonascii _subtotal
	}

	display "There are `total' Unicode characters in `affected' values"
end