Bidi isLeftToRight Example

Bidi class isLeftToRight example. This example shows you how to use isLeftToRight method.


Bidi class isLeftToRight example. public boolean isLeftToRight() Return true if the line is all left-to-right text and the base direction is left-to-right.

Here is the code
/*
 * @ # IsLeftToRight.java
 * A class representing use to isLeftToRight
 * method of Bidi class in java.text package
 * version 13 June 2008
 * author Rose India
 */

import java.text.*;

public class IsLeftToRight {

    public static void main(String args[]) {

        String s = "Rose india.net";
        char[] ch = s.toCharArray();
        byte[] embeddings = {1234};
        int textStart = 0, embStart = 0, paragraphLength = 4;
        int flag = Bidi.DIRECTION_DEFAULT_LEFT_TO_RIGHT;
        Bidi bidi = new Bidi(ch, textStart, embeddings,
                embStart, paragraphLength, flag);

        System.out.println("Bidi is left to right " + bidi.isLeftToRight());
    }
}

Output
Bidi is left to right false

Post Comment
Name:
E-mail:
Contact no :
Comments:
  Refresh Image
Verify Image:
 
 
Your Comment's
 
 
 

HOME | COPYRIGHT | CONTACT US