How to check that entered string contains Unicode: 0x1a value


I want to know that entered string is contains Unicode:0x1a value or not in java. I am not able to identify the value of → and other special character.


Because the character "→" has a Unicode code point \u2192.

String s = "this is → my arrow"; if (s.contains("→")) { System.out.println("Contains arrow!"); } else { System.out.println("No arrows in my string :("); }

As an alternative you may write the character in hex notation:

String s = "this is → my arrow"; if (s.contains("\u2192")) { System.out.println("Contains arrow!"); } else { System.out.println("No arrows in my string :("); }


  • Compare values from two dataframes and merge
  • Escaping and Inserting Serialized Data to MySQL
  • Calulate crc of an ethernet frames
  • determine if the bits are encrypted?
  • WCF Service Application returns 404 using WebGet
  • How do I include superscripts in NSString?
  • Determining if a string has been entered with a leading single quote
  • Type mismatch: cannot convert from Connection to Connection
  • Can't get any output from the taglib
  • Drag and Drop for imageview not working
  • Add class element based on the name of the page
  • Delphi. Analog of Memo/RichEdit
  • How to remove last utf8 char of a python string
  • Implementation of RTTI using typeid
  • Using HTML/CSS for UI in XNA?
  • Creating a C++ function that calls other Lua function
  • C function strchr - How to calculate the position of the character?
  • Why isn't my “Fizz Buzz” test in R working?
  • Validate jQuery plugin, field not required
  • Trying to get the char code of ENTER key
  • preg_replace Double Spaces to tab (\\t) at the beginning of a line
  • Projection media query: browser support and workarounds?
  • Android screen density dpi vs ppi
  • swift auto completion not working in Xcode6-Beta
  • How would I use PHP exceptions to define a redirect?
  • Cross-Platform Protobuf Serialization
  • How to extract text from Word files using C#?
  • AT Commands to Send SMS not working in Windows 8.1
  • How to format a variable of double type
  • Windows forms listbox.selecteditem displaying “System.Data.DataRowView” instead of actual value
  • WPF Applying a trigger on binding failure
  • Acquiring multiple attributes from .xml file in c#
  • coudnt use logback because of log4j
  • How to CLICK on IE download dialog box i.e.(Open, Save, Save As…)
  • need help with bizarre java.net.HttpURLConnection behavior
  • apache spark aggregate function using min value
  • How can I remove ASP.NET Designer.cs files?
  • JaxB to read class hierarchy
  • Sorting a 2D array using the second column C++
  • java string with new operator and a literal