Browsed by
Tag: string

Caesar encryption of string using JavaScript

Caesar encryption of string using JavaScript

Caesar encryption of string is basically shifting of characters by some amount. Let me put it this way, if you’ve a string “abc” and you want it to be shifted by amount 4. i.e. “efg”. This is called Caesar encryption.

Here in this example, we are going to use concept of ASCII code. Every letter in alphabet has some decimal value assigned i.e. “a” = 97, “b” = 98 …”z” = 122 or “A” = 65, “B” = 66…”Z” = 90.

Read More Read More

Convert String to Stream to String

Convert String to Stream to String

In java programming language, String is most widely used class. In certain situations we need to convert String to stream and vice versa. One such scenario is while reading data from a file, we have to convert stream to String. In this blog, we will see how to convert String to Stream and vise versa.You can learn more about String and other classes related with String like StringBuffer and StringBuilder in detail in String in java, StringBuffer in java and StringBuilder in java.

Read More Read More