The backslash character has a special function when used in a string literal : Escape « String « Flash / Flex / ActionScript






The backslash character has a special function when used in a string literal

 

package{
  import flash.display.Sprite;
  
  public class Main extends Sprite{
    public function Main(){
        trace("\\");  // displays: \

    }
  }
}

        








Related examples in the same category

1.A complete listing of all the escape sequences available to you
2.Passing String Values to and from Applications (escape)
3.unescape() function does not modify the existing string, but returns a new string
4.Escaping Characters
5.An example of the newline character used in a string
6.Display \n literally, instead of a newline, you can add an additional backslash just before it
7.Using Quotes and Apostrophes in Strings
8.Inserting Special Whitespace Characters: Newline \n
9.Inserting Special Whitespace Characters: Tab \t
10.Inserting Special Whitespace Characters: Backspace \b
11.Inserting Special Whitespace Characters: Form feed \f
12.Inserting Special Whitespace Characters: Carriage return \r