我正在使用objective-c来解析句子:
NSString *myString = @“Some words to form a string”;
这是我到目前为止所做的:
NSMutableString *firstCharacters = [NSMutableString string];
NSMutableString *lastCharacters = [myString substringFromIndex:[myString length] - 1]
NSArray *arrayOfWords = [myString componentsSeparatedByString:[NSCharacterSet whitespaceCharacterSet]];
for (NSString *word in arrayOfWords) {
if ([word length] > 0) {
NSString *firstLetter = [word substringToIndex:1];
[firstCharacters appendString:lastCharacters];
然后我真的很难过。我想NSLog重组字符串,使它看起来像这样: “S2e w3s to f2m a s3g”
答案 0 :(得分:1)
请尝试以下代码:
<h:outputLink value="#{request.contextPath}/download/#{bean.fileName}">
<f:param name="selectedDownloadValue" value="foo" />
Download
</h:outputLink>