Not A Standard
The usage of the asterisks as an indicator for a modified in-memory change is something that appears mostly on the Windows platform. Mac and Linux have not been too quick to follow this, but there are a few multi-platform editors that do use it.
The asterisks is used when the UI element (title bar or tab) is capable of displaying only text. If that UI element supports icons associated with the text, then your alternative is a more informative icon.
Mainly MDI
MDI (Multi Document Interface) seems to be the most common place where this is done, and I can only assume it comes from the challenges of a user trying to multi-task. Being able to work on more than one document at a time raises the risk of data loss. If a user makes changes to document A, and then switches to document B. They no longer have document A at the top of the window stack, and may forget to save their changes until they exit the application. In the event of a power failure their changes will be lost.
Mac Is Different
On the Mac OS platform the MDI interface is less popular. Instead it uses multiple editors where each editor is associated with one document. It's the same multitasking behavior, but it's slightly different on the internals for the software.

When the user switches from one document to the other the OS notifies one editor that it's switching to a background state. Whereas on Windows the same program stays active, and just the document of focus changes. So it's more common for a Mac to prompt to save changes, then to simply indicate it, but I'm not sure when this often happens.

MDI And Tabs
In the first generation of MDI applications there weren't any tabs, and then later tabs were introduced to make it easier to switch documents. With the introduction of tabs the user was able to see all open documents, but there was are standards on how to indicate which of those documents has changed.
Three States For A Document
A document in an editor exists in 3 possible states.
- The document is the same as the one on disk, or never saved.
- The document has not changed, but the document on disk has changed.
- The document has changed, but the document on disk has not changed.
When the document in memory is new. It's common to see the document icon as part of the tab, but the icon is modified to indicate a new
state.

Now for the other states you can also change the icon, and for tabs where icons are used. I recommend to modify the icon and not use text to indicate a change of state.
Asterisk Before or After
I have seen the asterisk place in both the before or after positions to mean the same thing. The most common occurrence is the after position, and I think this is to prevent it from obscuring the name of the file. When you place it in the front it interferes with left-to-right reading. For example; mathew.txt*
is easier to read then *mathew.txt
. Also, when it's positioned at the end it won't interfere with sorting.
I was able to find a few images ranging from text editors to CAD drawings that demonstrate the after usage. So this confirms it's popularity by commonly used software.


The Often Forgotten Third State
So there is the new document state, the changed document state but also the modified on disk state.
This is the least standardized UI feature. It seems that every editor implements it differently. The one implementation I prefer is a strong indicator that retains the ability to review the in-memory
version before reloading the disk version.
Most editors simply display a pop-up prompt "The file has changed on disk, reload?" and you are left to make a decision. Without being able to review what you had in memory.
This interface demonstrates my preferred method. A non-blocking notification of the change with the option to reload it. Without blocking me from reviewing the in-memory copy before I reload the new version.
