Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3211562
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T14:44:48+00:00 2026-05-17T14:44:48+00:00

I want NSLog to output a literal escape sequence, without treating it as a

  • 0

I want NSLogto output a literal escape sequence, without treating it as a pattern.

Take, for example NSLog(@"image%03d.jpg");, who’s output I want to be the actual contents, image%03d.jpg instead of image000.jpg.

I’ve tried various escape sequences like NSLog(@"image\\%03d.jpg");, NSLog(@"image\\%03\\d.jpg"); and NSLog(@"image%03\\d.jpg");, none of which yielded the expected results.

The problem only grows further when I’m including an actual pattern that I do want to replace, after the literal one: NSLog(@"image\\%03d.jpg test %d", 1);, that I’d like to output image%03d.jpg test 1.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-17T14:44:48+00:00Added an answer on May 17, 2026 at 2:44 pm

    Use two %% characters and you will get the desired results:

    NSLog(@"image%%03d.jpg");
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to take an NSLog() message and save it as a NSString. For
I want to define a following function: if(stmtToFinalize) { NSLog(@Finalizing statement stmtToFinalize); if (sqlite3_finalize(stmtToFinalize)
When I use NSLog(@fooBar) it prints out a lot of stuff I don't want:
Without any preamble I want to show you problem I have in my program,
this is the output i want SELECT * FROM wateat_tbl where name like '%love%'
I want to use - (void)drawRect:(CGRect)rect to manage some nice output to UIViewController. That
I want a input from user their name and output that input name in
I want to know why there´s no console output when testing on the iOS
I want to output several questions, but in a random order. How can I
I have some Bytes of image in my string and i want to draw

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.