blob: 607343a62ead9eae7c08dc45d9027c852edae38d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
// A set of combine utilities for use with Space.comb()
// Note: char1 is this and char2 is other. char1 will go "over" char2
exports.add = function(char1, char2){
if (char1 == '') return char2;
else return char1;
}
exports.sub = function(char1, char2){
if (char1 == char2) return '';
else return char1;
}
exports.mask = function(char1, char2){ // Meant for hiding text (if char1 is valid, mask char2 with null character)
if (char1 == '') return char2;
else return '';
}
|