<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
	<key>groupInfo</key>
	<dict>
		<key>expandAfterMode</key>
		<integer>2</integer>
		<key>groupName</key>
		<string>Text Utilities</string>
		<key>notes</key>
		<string>text- variants are for use in other snippets; use paste- to manipulate and return the clipboard.</string>
	</dict>
	<key>snippetsTE2</key>
	<array>
		<dict>
			<key>abbreviation</key>
			<string>text-caps</string>
			<key>abbreviationMode</key>
			<integer>1</integer>
			<key>creationDate</key>
			<date>2022-09-15T05:03:00Z</date>
			<key>label</key>
			<string>Convert clipboard to ALL CAPS</string>
			<key>modificationDate</key>
			<date>2022-09-15T05:03:00Z</date>
			<key>plainText</key>
			<string>TextExpander.ignoreOutput = true;
var text = TextExpander.pasteboardText.toUpperCase();
</string>
			<key>snippetType</key>
			<integer>4</integer>
			<key>uuidString</key>
			<string>9A05A3C9-0073-4B63-9FEB-5CA801FA08FE</string>
		</dict>
		<dict>
			<key>abbreviation</key>
			<string>text-title</string>
			<key>abbreviationMode</key>
			<integer>1</integer>
			<key>creationDate</key>
			<date>2022-09-15T05:03:00Z</date>
			<key>label</key>
			<string>Convert clipboard to title case</string>
			<key>modificationDate</key>
			<date>2022-09-15T05:03:00Z</date>
			<key>plainText</key>
			<string>String.prototype.toTitleCase = function() {
  var i, j, str, lowers, uppers;
  str = this.replace(/([^\W_]+[^\s-]*) */g, function(txt) {
    return txt.charAt(0).toUpperCase() + txt.substr(1).toLowerCase();
  });

  // Certain minor words should be left lowercase unless 
  // they are the first or last words in the string
  lowers = ['A', 'An', 'The', 'And', 'But', 'Or', 'For', 'Nor', 'As', 'At', 
  'By', 'For', 'From', 'In', 'Into', 'Near', 'Of', 'On', 'Onto', 'To', 'With','I3','I8'];
  for (i = 0, j = lowers.length; i &lt; j; i++)
    str = str.replace(new RegExp('\\s' + lowers[i] + '\\s', 'gi'), 
      function(txt) {
        return txt.toLowerCase();
      });

  // Certain words such as initialisms or acronyms should be left uppercase
  uppers = ['ID', 'TV', 'GMC', 'RAM', 'BMW', 'MINI', 'RX', 'LX', 'MKX', 'MKZ', 'MKC', 'MKT', 'MKS', 'GS', 'NX', 'CT', 'ES', 'GX', 'RC', 'CLA', 'CLS', 'GLS', 'GLC', 'SLK', 'AMG', 'SLC', 'CTS', 'SRX', 'ATS', 'ESV', 'XTS', 'XT5', 'CT6', 'ATS-V', 'CTS-V', 'HRV', 'CRV', 'HR-V', 'CR-V', 'TT', 'SQ5', 'TTS', 'XLT', 'LS', 'LT', 'LT Z71', 'LTZ', 'LARIAT', 'SE', 'SEL', 'SLE', 'SLT'];
  for (i = 0, j = uppers.length; i &lt; j; i++)
    str = str.replace(new RegExp('\\b' + uppers[i] + '\\b', 'gi'), 
      uppers[i].toUpperCase());

  return str;
}

TextExpander.ignoreOutput = true;

var text = TextExpander.pasteboardText.toLowerCase().toTitleCase();</string>
			<key>snippetType</key>
			<integer>4</integer>
			<key>uuidString</key>
			<string>00943E2C-6FF3-4949-82A3-D450E0C399B9</string>
		</dict>
		<dict>
			<key>abbreviation</key>
			<string>paste-trim</string>
			<key>abbreviationMode</key>
			<integer>1</integer>
			<key>creationDate</key>
			<date>2022-09-15T05:03:00Z</date>
			<key>label</key>
			<string>Paste after trimming  whitespace and line breaks</string>
			<key>modificationDate</key>
			<date>2022-09-15T05:03:00Z</date>
			<key>plainText</key>
			<string>%snippet:text-trim%
TextExpander.pasteboardText = text;
text;</string>
			<key>snippetType</key>
			<integer>4</integer>
			<key>uuidString</key>
			<string>BF15D162-89AF-406A-9407-2AD9F784E5A1</string>
		</dict>
		<dict>
			<key>abbreviation</key>
			<string>paste-spaces</string>
			<key>abbreviationMode</key>
			<integer>1</integer>
			<key>creationDate</key>
			<date>2022-09-15T05:03:00Z</date>
			<key>label</key>
			<string>Paste clipboard after trimming whitespace and line breaks</string>
			<key>modificationDate</key>
			<date>2022-09-15T05:03:00Z</date>
			<key>plainText</key>
			<string>%snippet:text-spaces%
TextExpander.pasteboardText = text;
TextExpander.appendOutput(text);</string>
			<key>snippetType</key>
			<integer>4</integer>
			<key>uuidString</key>
			<string>89FE0AA7-50D5-4865-B484-300B7754884B</string>
		</dict>
		<dict>
			<key>abbreviation</key>
			<string>paste-urltrim</string>
			<key>abbreviationMode</key>
			<integer>0</integer>
			<key>creationDate</key>
			<date>2022-09-15T05:03:00Z</date>
			<key>label</key>
			<string>Paste clipboarding after trimming URL</string>
			<key>modificationDate</key>
			<date>2022-09-15T05:03:00Z</date>
			<key>plainText</key>
			<string>%snippet:text-urltrim%
TextExpander.pasteboardText = text;
text;</string>
			<key>snippetType</key>
			<integer>4</integer>
			<key>uuidString</key>
			<string>27C86D95-4AF5-4211-B038-3F52B789C75E</string>
		</dict>
		<dict>
			<key>abbreviation</key>
			<string>paste-file-name</string>
			<key>abbreviationMode</key>
			<integer>1</integer>
			<key>creationDate</key>
			<date>2022-09-15T05:03:00Z</date>
			<key>label</key>
			<string>Paste clipboard replacing underscores and dashes with spaces</string>
			<key>modificationDate</key>
			<date>2022-09-15T05:03:00Z</date>
			<key>plainText</key>
			<string>%snippet:text-file-name%
TextExpander.appendOutput(text);</string>
			<key>snippetType</key>
			<integer>4</integer>
			<key>uuidString</key>
			<string>574653BB-7ED7-4AD8-A843-0AD19A96EA7B</string>
		</dict>
		<dict>
			<key>abbreviation</key>
			<string>paste-no-nbsp</string>
			<key>abbreviationMode</key>
			<integer>0</integer>
			<key>creationDate</key>
			<date>2022-09-15T05:03:00Z</date>
			<key>label</key>
			<string>Paste clipboard deleting nonbreaking spaces</string>
			<key>modificationDate</key>
			<date>2022-09-15T05:03:00Z</date>
			<key>plainText</key>
			<string>%snippet:text-no-nbsp%
TextExpander.pasteboardText = text;
TextExpander.appendOutput(text);</string>
			<key>snippetType</key>
			<integer>4</integer>
			<key>uuidString</key>
			<string>B74434D8-78C1-4CE1-AE30-5CF028F69038</string>
		</dict>
		<dict>
			<key>abbreviation</key>
			<string>paste-title</string>
			<key>abbreviationMode</key>
			<integer>1</integer>
			<key>creationDate</key>
			<date>2022-09-15T05:03:00Z</date>
			<key>label</key>
			<string>Paste clipboard title case</string>
			<key>modificationDate</key>
			<date>2022-09-15T05:03:00Z</date>
			<key>plainText</key>
			<string>%snippet:text-title%
TextExpander.pasteboardText = text;
text;</string>
			<key>snippetType</key>
			<integer>4</integer>
			<key>uuidString</key>
			<string>4920415B-D8B5-491C-A9D7-E9E682321D5E</string>
		</dict>
		<dict>
			<key>abbreviation</key>
			<string>paste-sentence</string>
			<key>abbreviationMode</key>
			<integer>1</integer>
			<key>creationDate</key>
			<date>2022-09-15T05:03:00Z</date>
			<key>label</key>
			<string>Paste clipboard sentence case</string>
			<key>modificationDate</key>
			<date>2022-09-15T05:03:00Z</date>
			<key>plainText</key>
			<string>%snippet:text-sentence%
TextExpander.pasteboardText = text;
text;</string>
			<key>snippetType</key>
			<integer>4</integer>
			<key>uuidString</key>
			<string>5EB6EFE7-A25B-42B3-B807-695941AC868A</string>
		</dict>
		<dict>
			<key>abbreviation</key>
			<string>paste-lower</string>
			<key>abbreviationMode</key>
			<integer>1</integer>
			<key>creationDate</key>
			<date>2022-09-15T05:03:00Z</date>
			<key>label</key>
			<string>Paste clipboard lower case</string>
			<key>modificationDate</key>
			<date>2022-09-15T05:03:00Z</date>
			<key>plainText</key>
			<string>%snippet:text-lower%
TextExpander.pasteboardText = text;
text;</string>
			<key>snippetType</key>
			<integer>4</integer>
			<key>uuidString</key>
			<string>381BAB7C-7539-4CA4-9A53-47CB8A9C1F86</string>
		</dict>
		<dict>
			<key>abbreviation</key>
			<string>paste-caps</string>
			<key>abbreviationMode</key>
			<integer>1</integer>
			<key>creationDate</key>
			<date>2022-09-15T05:03:00Z</date>
			<key>label</key>
			<string>Paste clipboard ALL CAPS</string>
			<key>modificationDate</key>
			<date>2022-09-15T05:03:00Z</date>
			<key>plainText</key>
			<string>%snippet:text-caps%
TextExpander.pasteboardText = text;
text;</string>
			<key>snippetType</key>
			<integer>4</integer>
			<key>uuidString</key>
			<string>F78B1725-F7E4-46CA-BE04-3DDEA7E9F510</string>
		</dict>
		<dict>
			<key>abbreviation</key>
			<string>text-no-nbsp</string>
			<key>abbreviationMode</key>
			<integer>0</integer>
			<key>creationDate</key>
			<date>2022-09-15T05:03:00Z</date>
			<key>label</key>
			<string>Delete nonbreaking spaces</string>
			<key>modificationDate</key>
			<date>2022-09-15T05:03:00Z</date>
			<key>plainText</key>
			<string>TextExpander.ignoreOutput = true;
var pattern = /[\u0026]nbsp;/ig
%snippet:text-spaces%
text = text.replace(pattern,' ');
text = text.replace(/&lt;span&gt;[\s]*&lt;\/span&gt;/ig,' ');
text = text.replace(/[ ]{2,}/g,' ');</string>
			<key>snippetType</key>
			<integer>4</integer>
			<key>uuidString</key>
			<string>F46FD128-EFB1-46F7-910F-CAFDE7FE71EC</string>
		</dict>
		<dict>
			<key>abbreviation</key>
			<string>text-urltrim</string>
			<key>abbreviationMode</key>
			<integer>0</integer>
			<key>creationDate</key>
			<date>2022-09-15T05:03:00Z</date>
			<key>label</key>
			<string>Trim URL</string>
			<key>modificationDate</key>
			<date>2022-09-15T05:03:00Z</date>
			<key>plainText</key>
			<string>TextExpander.ignoreOutput = true;
var pattern = /(?:http|https|ftp):\/\/(.+?)\/?$/i
var text = TextExpander.pasteboardText.trim().replace(pattern,'$1');</string>
			<key>snippetType</key>
			<integer>4</integer>
			<key>uuidString</key>
			<string>9045E17F-87FF-4582-9CC8-F348A14EF04B</string>
		</dict>
		<dict>
			<key>abbreviation</key>
			<string>text-sentence</string>
			<key>abbreviationMode</key>
			<integer>1</integer>
			<key>creationDate</key>
			<date>2022-09-15T05:03:00Z</date>
			<key>label</key>
			<string>Convert clipboard to sentence case</string>
			<key>modificationDate</key>
			<date>2022-09-15T05:03:00Z</date>
			<key>plainText</key>
			<string>TextExpander.ignoreOutput = true;
var text = TextExpander.pasteboardText.toLowerCase();
text = text.replace(/\b[i]\b/g,'I');
text = text.charAt(0).toUpperCase() + text.slice(1);</string>
			<key>snippetType</key>
			<integer>4</integer>
			<key>uuidString</key>
			<string>BFA750B9-4A97-446A-B315-338A008763E3</string>
		</dict>
		<dict>
			<key>abbreviation</key>
			<string>text-lower</string>
			<key>abbreviationMode</key>
			<integer>1</integer>
			<key>creationDate</key>
			<date>2022-09-15T05:03:00Z</date>
			<key>label</key>
			<string>Convert clipboard to lower case</string>
			<key>modificationDate</key>
			<date>2022-09-15T05:03:00Z</date>
			<key>plainText</key>
			<string>TextExpander.ignoreOutput = true;
var text = TextExpander.pasteboardText.toLowerCase();</string>
			<key>snippetType</key>
			<integer>4</integer>
			<key>uuidString</key>
			<string>DCA8F83D-AEA1-48B9-BDAC-1D0A36AB9226</string>
		</dict>
		<dict>
			<key>abbreviation</key>
			<string>text-spaces</string>
			<key>abbreviationMode</key>
			<integer>1</integer>
			<key>creationDate</key>
			<date>2022-09-15T05:03:00Z</date>
			<key>label</key>
			<string>Trim whitespace and lines from clipboard</string>
			<key>modificationDate</key>
			<date>2022-09-15T05:03:00Z</date>
			<key>plainText</key>
			<string>TextExpander.ignoreOutput = true;
if ( !text ) {
  var text = TextExpander.pasteboardText.trim();
}
text = text.replace(/[&gt;][ ]+/g,'&gt;');
text = text.replace(/[ ]+(?=&lt;)/g,'');
text = text.replace(/[ ]{2,}/g,' ');
text = text.replace(/[ ]{2,}/g,' ');</string>
			<key>snippetType</key>
			<integer>4</integer>
			<key>uuidString</key>
			<string>80172C18-AEB4-4C15-A22A-03957547B64C</string>
		</dict>
		<dict>
			<key>abbreviation</key>
			<string>text-trim</string>
			<key>abbreviationMode</key>
			<integer>1</integer>
			<key>creationDate</key>
			<date>2022-09-15T05:03:00Z</date>
			<key>label</key>
			<string>Trim whitespace and lines from clipboard</string>
			<key>modificationDate</key>
			<date>2022-09-15T05:03:00Z</date>
			<key>plainText</key>
			<string>TextExpander.ignoreOutput = true;
var text = TextExpander.pasteboardText.trim().replace(/[\r\n]/g,' ').replace(/[ ]{2,}/g,' ');
</string>
			<key>snippetType</key>
			<integer>4</integer>
			<key>uuidString</key>
			<string>989CBCFE-355C-4139-8F6E-FC952951792E</string>
		</dict>
		<dict>
			<key>abbreviation</key>
			<string>text-file-name</string>
			<key>abbreviationMode</key>
			<integer>1</integer>
			<key>creationDate</key>
			<date>2022-09-15T05:03:00Z</date>
			<key>label</key>
			<string>Replace underscores and dashes with spaces</string>
			<key>modificationDate</key>
			<date>2022-09-15T05:03:00Z</date>
			<key>plainText</key>
			<string>switch ( '%fillpopup:name=Replace...:Dash:Hyphen:default=Both%' ) {
  case 'Dash':
    var pattern = /[-]+/g;
    break;

  case 'Hyphen':
    var pattern = /[_]+/g;
    break;

  default:
    var pattern = /[_-]+/g;

}
var textParts = TextExpander.pasteboardText.trim().split('.');
var text = textParts[ textParts.length-2 ].replace(pattern,' ');
TextExpander.appendOutput(text);</string>
			<key>snippetType</key>
			<integer>4</integer>
			<key>uuidString</key>
			<string>497963CE-8C05-4F10-981C-46CDC3E03DEF</string>
		</dict>
		<dict>
			<key>abbreviation</key>
			<string>paste-plain</string>
			<key>abbreviationMode</key>
			<integer>0</integer>
			<key>creationDate</key>
			<date>2022-09-15T05:03:00Z</date>
			<key>label</key>
			<string>Paste as plain text</string>
			<key>modificationDate</key>
			<date>2022-09-15T05:03:00Z</date>
			<key>plainText</key>
			<string>%clipboard</string>
			<key>snippetType</key>
			<integer>0</integer>
			<key>uuidString</key>
			<string>2E9EB466-4024-4F7C-AB12-D4063353BD05</string>
		</dict>
	</array>
</dict>
</plist>
