1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Special unicode string splitting

Discussion in 'JavaScript' started by michealJA, Feb 26, 2017.

  1. #1
    I am working with emoJi in javascript. I want to do something look like on the site: fancymessage.com
    For example, I have a message in unicode emoj: [​IMG]
    How can I split every characters.
    I just want to use javascript based libraries for client side: jquery, dojo... (not nodejs). I tried to process as normal string, but I didn't get success. I wonder that some unicode characters are not 1 space, but can be 2, 3,... spaces and some unicode characters is not shift left to right, but is right to left. So the index of normal string can not be done.
    Anyone can help me please !
     
    Last edited: Feb 26, 2017
    michealJA, Feb 26, 2017 IP
  2. PoPSiCLe

    PoPSiCLe Illustrious Member

    Messages:
    4,623
    Likes Received:
    725
    Best Answers:
    152
    Trophy Points:
    470
    #2
    How do you use the unicode characters? If you're using HTML entities (for instance, ° ) then just split on the ; - if you're using other entities, then you'll have to find something else to split it on.
     
    PoPSiCLe, Feb 27, 2017 IP
  3. deathshadow

    deathshadow Acclaimed Member

    Messages:
    9,732
    Likes Received:
    1,998
    Best Answers:
    253
    Trophy Points:
    515
    #3
    Could you repeat your question in English?
     
    deathshadow, Mar 3, 2017 IP
    Spoiltdiva likes this.
  4. Spoiltdiva

    Spoiltdiva Acclaimed Member

    Messages:
    7,738
    Likes Received:
    2,893
    Best Answers:
    53
    Trophy Points:
    520
    #4
    I would have presumed that as long as you've been here, you would have become proficient in both languages that are regularly spoken here on DP. (English/Gibberish)
     
    Spoiltdiva, Mar 3, 2017 IP
    mmerlinn likes this.