Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to add custom label instand of @"{{" and@ "}}" #96

Closed
JokerXu opened this issue Jun 4, 2015 · 3 comments
Closed

How to add custom label instand of @"{{" and@ "}}" #96

JokerXu opened this issue Jun 4, 2015 · 3 comments

Comments

@JokerXu
Copy link

JokerXu commented Jun 4, 2015

I want to define my custom label like .
Because the server couldn't deliver me @"{{" or @"}}" because of it will mix the json data。
The server just give me the string like ,I want the GRMustache will repalce it with the string like
bdec6160-513f-4f79-87ae-6fe623593933

Please forgive my terrible English.

@groue
Copy link
Owner

groue commented Jun 4, 2015

Hello @JokerXu.

Mustache is about injecting named values. For example: inject the number of players here, their names there, and their scores here. And those names must be enclosed in tags: {{playerCount}}, {{name}}, {{score}}.

You can use arbitrary strings for delimiting tags, instead of the default {{ and }}: <% name %>...<% score %>, or BEGIN name END...BEGIN score END.

So you have to ask yourself if this is what you want. Can you express your needs in terms of names and tags delimiters?

I'm not sure you can, because you ask for defining your "custom label".

So I'm wondering if the best tool for the job is -[NSString stringByReplacingOccurrencesOfString:withString:]: https://developer.apple.com/library/ios/documentation/Cocoa/Reference/Foundation/Classes/NSString_Class/index.html#//apple_ref/occ/instm/NSString/stringByReplacingOccurrencesOfString:withString:

Please investigate this simple solution.

@JokerXu
Copy link
Author

JokerXu commented Jun 4, 2015

Thank you very much.
I know -[NSString stringByReplacingOccurrencesOfString:withString:]:
But I think your tools is more efficiency than it at first...Now I figure out..
I am a Chinese .and I join in apple developer family less than two years.And my English is so terrible.
Your this project is very efficacious to solve the problem for data and model to generate html string. However,your project lack of Chinese blog to tell us how to use it,in google,I can't find any useful Chinese blog.
So I want to write a blog in Chinese language to support your project and help the people who not good at english.Although I am clumsy,but I want try,and tring..
I hope we can become friends.I don't know what's IM you use.My Email:qq386502324@gmail.com.
And I want to communicate with you by IM or any methods.
And I hope someday,You can visit Beijing,China,My country.
And I will improve my English to welcome you.
Of course,I'll treat you😄😄

@groue
Copy link
Owner

groue commented Jun 4, 2015

It's so kind of you! I'm French, so English is not my mother tongue: beware my English!

I would be very proud if a Chinese blog would talk about GRMustache. Many Chinese people have show interest in the repository. Such a blog would surely be very helpful to them.

When somebody asks a question about GRMustache, I always answer, when I have the time. This is the same for you. So please dare asking questions.

@groue groue closed this as completed Jun 4, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants