Documentation

Una is developed by Una Technologies Limited

All rights reserved

© 2022 Una Technologies Limited

Print

Showing the Order of Characters in Two Texts

Compare this to …

				
					{"blocks":"<xml xmlns=\"https://developers.google.com/blockly/xml\"><block type=\"string_compare\" disabled=\"true\" x=\"-22\" y=\"562\"><value name=\"this\"><shadow type=\"text\" disabled=\"true\"><field name=\"TEXT\">this</field></shadow></value><value name=\"that\"><shadow type=\"text\" disabled=\"true\"><field name=\"TEXT\"/></shadow></value></block></xml>"}
				
			

This block is used to show the order of characters in two texts is different.

Parameters: Screen Item/String

Output: Number

Sample code:

				
					{"blocks":"<xml xmlns=\"https://developers.google.com/blockly/xml\"><block type=\"pxt-on-start\" x=\"0\" y=\"0\"><statement name=\"HANDLER\"><block type=\"basic_consoleLogNum\"><value name=\"num\"><block type=\"string_compare\"><value name=\"this\"><shadow type=\"text\"><field name=\"TEXT\"/></shadow><block type=\"typescript_expression\"><field name=\"EXPRESSION\">\"Hello World\"</field></block></value><value name=\"that\"><shadow type=\"text\"><field name=\"TEXT\">Hello</field></shadow></value></block></value></block></statement></block></xml>"}
				
			

The output:

Compare... - Output
Previous Showing Text in Substring Format
Next Displaying Character at the Certain Position